From 4ae878baf9408f61cff31ad7102584e299291fb9 Mon Sep 17 00:00:00 2001 From: rocketcamel Date: Sat, 25 Jan 2025 00:44:22 +0000 Subject: [PATCH] fix: better isWSL handling --- nix/flake.nix | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/nix/flake.nix b/nix/flake.nix index 5ecb39e..3ff82e2 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -24,7 +24,6 @@ } { name = "tux"; - isWSL = false; } ]; in @@ -40,16 +39,20 @@ }; }; system = "x86_64-linux"; - modules = [ - ./hosts/${host.name}/configuration.nix - home-manager.nixosModules.home-manager - { - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; - } - ] ++ (if host.isWSL then [ nixos-wsl.nixosModules.default ] else [ ]); + modules = + [ + ./hosts/${host.name}/configuration.nix + home-manager.nixosModules.home-manager + { + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + } + ] + ++ ( + if builtins.hasAttr "isWSL" host && host.isWSL then [ nixos-wsl.nixosModules.default ] else [ ] + ); }; }) hosts );