mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
Modularize the library
The flake utilities are too specific. Not going to contribute further crap in the world. ;p
This commit is contained in:
parent
cd15eada5a
commit
09f8a1f763
@ -33,11 +33,16 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||||
|
|
||||||
libExtended = nixpkgs.lib.extend (final: prev:
|
libExtended = nixpkgs.lib.extend (final: prev:
|
||||||
(import ./lib {
|
(import ./lib {
|
||||||
inherit inputs;
|
|
||||||
lib = final;
|
lib = final;
|
||||||
}));
|
}) // {
|
||||||
|
flakeUtils = (import ./lib/flake-utils.nix {
|
||||||
|
inherit inputs;
|
||||||
|
lib = final;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
# The default configuration for our NixOS systems.
|
# The default configuration for our NixOS systems.
|
||||||
hostDefaultConfig = {
|
hostDefaultConfig = {
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
{ lib, inputs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
flakeUtils = import ./flake-utils.nix { inherit lib inputs; };
|
|
||||||
in rec {
|
|
||||||
inherit flakeUtils;
|
|
||||||
|
|
||||||
|
rec {
|
||||||
/* Create an attribute set that represents the structure of the modules
|
/* Create an attribute set that represents the structure of the modules
|
||||||
inside of a directory. While it can recurse into directories, it will
|
inside of a directory. While it can recurse into directories, it will
|
||||||
stop once it detects `default.nix` inside.
|
stop once it detects `default.nix` inside.
|
||||||
|
@ -76,6 +76,6 @@ in rec {
|
|||||||
configuration = import file;
|
configuration = import file;
|
||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${username}";
|
||||||
extraModules = hmModules ++ extraModules ++ [ (lib.filterAttrs (n: _: !lib.elem n hmConfigFunctionArgs) attrs) ];
|
extraModules = hmModules ++ extraModules ++ [ (lib.filterAttrs (n: _: !lib.elem n hmConfigFunctionArgs) attrs) ];
|
||||||
extraSpecialArgs = { inherit system; };
|
extraSpecialArgs = { inherit lib system; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user