Reformat nix source file using nixfmt
This commit is contained in:
parent
2e4a532958
commit
9201969c1b
220 changed files with 3169 additions and 2487 deletions
|
|
@ -2,66 +2,72 @@
|
|||
inputs,
|
||||
rootPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(rootPath + "/treefmt.nix")
|
||||
];
|
||||
perSystem = {
|
||||
pkgs,
|
||||
system,
|
||||
lib,
|
||||
self',
|
||||
inputs',
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) nixpkgs;
|
||||
in {
|
||||
_module.args.pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
overlays = [(_final: _prev: {inherit lib;})];
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
name = "nixos-shell";
|
||||
packages = with pkgs; [
|
||||
nixd
|
||||
nil
|
||||
typos
|
||||
typos-lsp
|
||||
just
|
||||
nvfetcher
|
||||
];
|
||||
};
|
||||
legacyPackages = let
|
||||
inputsScope = lib.makeScope pkgs.newScope (self: {
|
||||
inherit inputs rootPath;
|
||||
srcs = self.callPackage (rootPath + "/_sources/generated.nix") {};
|
||||
inherit (inputs'.nixvim.legacyPackages) makeNixvim makeNixvimWithModule;
|
||||
inherit (self'.legacyPackages) nixvimPlugins;
|
||||
neovim_git = inputs'.neovim-nightly.packages.default;
|
||||
});
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
system,
|
||||
lib,
|
||||
self',
|
||||
inputs',
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (inputs) nixpkgs;
|
||||
in
|
||||
lib.packagesFromDirectoryRecursive {
|
||||
inherit (inputsScope) callPackage;
|
||||
directory = rootPath + "/pkgs";
|
||||
{
|
||||
_module.args.pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
overlays = [ (_final: _prev: { inherit lib; }) ];
|
||||
};
|
||||
packages = let
|
||||
flattenPkgs = path: value:
|
||||
if lib.isDerivation value
|
||||
then {
|
||||
${lib.concatStringsSep "/" path} = value;
|
||||
}
|
||||
else if lib.isAttrs value
|
||||
then lib.concatMapAttrs (name: flattenPkgs (path ++ [name])) value
|
||||
else {};
|
||||
in
|
||||
flattenPkgs [] self'.legacyPackages;
|
||||
checks =
|
||||
lib.concatMapAttrs (name: value: {
|
||||
devShells.default = pkgs.mkShell {
|
||||
name = "nixos-shell";
|
||||
packages = with pkgs; [
|
||||
nixd
|
||||
nil
|
||||
typos
|
||||
typos-lsp
|
||||
just
|
||||
nvfetcher
|
||||
];
|
||||
};
|
||||
legacyPackages =
|
||||
let
|
||||
inputsScope = lib.makeScope pkgs.newScope (self: {
|
||||
inherit inputs rootPath;
|
||||
srcs = self.callPackage (rootPath + "/_sources/generated.nix") { };
|
||||
inherit (inputs'.nixvim.legacyPackages) makeNixvim makeNixvimWithModule;
|
||||
inherit (self'.legacyPackages) nixvimPlugins;
|
||||
neovim_git = inputs'.neovim-nightly.packages.default;
|
||||
});
|
||||
in
|
||||
lib.packagesFromDirectoryRecursive {
|
||||
inherit (inputsScope) callPackage;
|
||||
directory = rootPath + "/pkgs";
|
||||
};
|
||||
packages =
|
||||
let
|
||||
flattenPkgs =
|
||||
path: value:
|
||||
if lib.isDerivation value then
|
||||
{
|
||||
${lib.concatStringsSep "/" path} = value;
|
||||
}
|
||||
else if lib.isAttrs value then
|
||||
lib.concatMapAttrs (name: flattenPkgs (path ++ [ name ])) value
|
||||
else
|
||||
{ };
|
||||
in
|
||||
flattenPkgs [ ] self'.legacyPackages;
|
||||
checks = lib.concatMapAttrs (name: value: {
|
||||
"package-${name}" = value;
|
||||
})
|
||||
self'.packages;
|
||||
};
|
||||
}) self'.packages;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue