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"`
|
# call like `mkSystem "x86_64-linux" "<hostname>.eh22.intern"`
|
||||||
mkSystem =
|
mkSystem =
|
||||||
systemType: name:
|
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;
|
system = systemType;
|
||||||
specialArgs = flake.inputs;
|
specialArgs = flake.inputs;
|
||||||
modules = [
|
modules = [
|
||||||
|
@ -17,8 +21,7 @@ let
|
||||||
|
|
||||||
../modules/base_system.nix
|
../modules/base_system.nix
|
||||||
../modules/user_account.nix
|
../modules/user_account.nix
|
||||||
#../modules/mail_relay.nix
|
systemModule
|
||||||
./${name}.nix
|
|
||||||
|
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue