diff --git a/flake.nix b/flake.nix index 7d3a03c..2a2f075 100644 --- a/flake.nix +++ b/flake.nix @@ -23,16 +23,5 @@ (import "${self}/src/base.nix") (import "${self}/pkgs/base.nix") ]; - localModules = [ - ( - { lib, ... }: - { - imports = - [ ] - ++ lib.optional (builtins.pathExists ./hardware-configuration.nix) (import ./hardware-configuration.nix) - ++ lib.optional (builtins.pathExists ./local.nix) (import ./local.nix); - } - ) - ]; }; } diff --git a/misc/flake.nix b/misc/flake.nix index 274fcbb..39b745a 100644 --- a/misc/flake.nix +++ b/misc/flake.nix @@ -7,6 +7,19 @@ outputs = { user-config, ... }@inputs: + let + localModules = [ + ( + { lib, ... }: + { + imports = + [ ] + ++ lib.optional (builtins.pathExists ./hardware-configuration.nix) (import ./hardware-configuration.nix) + ++ lib.optional (builtins.pathExists ./local.nix) (import ./local.nix); + } + ) + ]; + in { nixosConfigurations = { "nyx" = user-config.inputs.nixpkgs.lib.nixosSystem { @@ -18,9 +31,7 @@ inputs = user-config.inputs; }; modules = - user-config.baseModules - ++ user-config.localModules - ++ [ (import "${inputs.user-config}/system/z13.nix") ]; + user-config.baseModules ++ localModules ++ [ (import "${inputs.user-config}/system/z13.nix") ]; }; "nixos" = user-config.inputs.nixpkgs.lib.nixosSystem { @@ -32,9 +43,7 @@ inputs = user-config.inputs; }; modules = - user-config.baseModules - ++ user-config.localModules - ++ [ (import "${inputs.user-config}/system/wsl.nix") ]; + user-config.baseModules ++ localModules ++ [ (import "${inputs.user-config}/system/wsl.nix") ]; }; }; };