allow system definitions to be done in folders
This commit is contained in:
parent
05fbd7183c
commit
f4ff592efd
1 changed files with 6 additions and 3 deletions
|
@ -6,7 +6,11 @@ let
|
|||
# call like `mkSystem "x86_64-linux" "<hostname>.eh22.intern"`
|
||||
mkSystem =
|
||||
systemType: name:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
systemModule = if lib.pathIsDirectory ./${name} then ./${name}/system.nix else ./${name}.nix;
|
||||
in
|
||||
lib.nixosSystem {
|
||||
system = systemType;
|
||||
specialArgs = flake.inputs;
|
||||
modules = [
|
||||
|
@ -17,8 +21,7 @@ let
|
|||
|
||||
../modules/base_system.nix
|
||||
../modules/user_account.nix
|
||||
#../modules/mail_relay.nix
|
||||
./${name}.nix
|
||||
systemModule
|
||||
|
||||
(
|
||||
let
|
||||
|
|
Loading…
Add table
Reference in a new issue