nixosConfiguration: do not use a list as namespace

This commit is contained in:
Jonas Rabenstein 2025-01-06 02:21:19 +01:00
commit a6b0f0a85d

View file

@ -1,7 +1,7 @@
{ nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { ... }@inputs: { host, ... }@imports: let { nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { ... }@inputs: { host, ... }@imports: let
host' = name: snippets: let host' = name: snippets: let
system = { namespace?"fbs42", nixpkgs?"nixpkgs" }: inputs.${nixpkgs}.lib.nixosSystem { system = { namespace?"fbs42", nixpkgs?"nixpkgs" }: inputs.${nixpkgs}.lib.nixosSystem {
specialArgs = { inherit inputs flake; namespace = if builtins.isList namespace then namespace else [ namespace ]; }; specialArgs = { inherit inputs flake namespace; };
modules = builtins.concatLists (map (base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${name}"; })) flake.lib.schema.base) modules = builtins.concatLists (map (base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${name}"; })) flake.lib.schema.base)
++ [ { config.networking.hostName = name; } ] ++ [ { config.networking.hostName = name; } ]
++ [ nixosModules.default ] ++ [ nixosModules.default ]