From 9a3f4341a08b81d490e5cbf01b3f19d371fd196d Mon Sep 17 00:00:00 2001 From: Armin Date: Mon, 27 May 2024 02:37:24 +0200 Subject: [PATCH] Revert "2024/05/27-02:30:50" This reverts commit e8111743c64c76ee5f71a9a3474fb91bb0bded0d. --- flake.nix | 11 ----------- misc/flake.nix | 21 +++++++++++++++------ 2 files changed, 15 insertions(+), 17 deletions(-) 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") ]; }; }; };