refactoe: moce common modules into their own file
This commit is contained in:
parent
52ec0abb0c
commit
1561628255
2 changed files with 20 additions and 16 deletions
20
flake.nix
20
flake.nix
|
@ -19,25 +19,13 @@
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
inherit (inputs.nixpkgs) lib;
|
inherit (inputs.nixpkgs) lib;
|
||||||
commonModules = [
|
|
||||||
./configs/boot.nix
|
|
||||||
./configs/nix-config.nix
|
|
||||||
./configs/security.nix
|
|
||||||
./configs/users.nix
|
|
||||||
./configs/networking.nix
|
|
||||||
./configs/shell.nix
|
|
||||||
./configs/programs/stylix.nix
|
|
||||||
];
|
|
||||||
graphicalModules = [
|
|
||||||
./configs/graphical.nix
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = args;
|
specialArgs = args;
|
||||||
modules =
|
modules = [
|
||||||
commonModules
|
./hosts/common.nix
|
||||||
++ lib.optionals (type == "graphical") graphicalModules
|
./hosts/${hostname}.nix
|
||||||
++ [ ./hosts/${hostname}.nix ];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
16
hosts/common.nix
Normal file
16
hosts/common.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ lib, type, ... }:
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
../configs/boot.nix
|
||||||
|
../configs/nix-config.nix
|
||||||
|
../configs/security.nix
|
||||||
|
../configs/users.nix
|
||||||
|
../configs/networking.nix
|
||||||
|
../configs/shell.nix
|
||||||
|
../configs/programs/stylix.nix
|
||||||
|
]
|
||||||
|
++ lib.optionals (type == "graphical") [
|
||||||
|
../configs/graphical.nix
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue