diff --git a/modules/home-manager/home.nix b/modules/home-manager/home.nix index b812027..95b1ac7 100644 --- a/modules/home-manager/home.nix +++ b/modules/home-manager/home.nix @@ -1,21 +1,28 @@ { - osConfig, - pkgs, - lib, + # lib, user, ... }: { imports = [ ./hosts - ./pc - ./theming + # ./pc + # ./theming ./environment.nix ./imports.nix ./module.nix ]; - pc.enable = lib.mkDefault osConfig.gui.enable; - theming.enable = lib.mkDefault osConfig.gui.enable; + # pc.enable = + # lib.mkDefault + # ( + # if (args ? nixosConfig) + # then osConfig.gui.enable + # else false + # ); + # theming.enable = + # if (args ? nixosConfig) + # then lib.mkDefault osConfig.gui.enable + # else false; environment.enable = true; # Allow unfree software diff --git a/modules/home-manager/imports.nix b/modules/home-manager/imports.nix index a532234..ff9efed 100644 --- a/modules/home-manager/imports.nix +++ b/modules/home-manager/imports.nix @@ -1,6 +1,27 @@ -{...}: { +{ + osConfig, + lib, + ... +} @ args: { imports = [ ./media + ./pc ./server + ./theming ]; + + config = lib.mkIf (args ? nixosConfig) { + pc.enable = lib.mkDefault osConfig.gui.enable; + + hostname = lib.mkDefault osConfig.networking.hostName; + keyboard = { + layout = lib.mkDefault osConfig.services.xserver.xkb.layout; + variant = lib.mkDefault osConfig.services.xserver.xkb.variant; + }; + theming = { + enable = lib.mkDefault osConfig.gui.enable; + image = lib.mkDefault osConfig.theming.image; + scheme = lib.mkDefault osConfig.theming.scheme; + }; + }; } diff --git a/modules/home-manager/module.nix b/modules/home-manager/module.nix index 7fae25a..7ba3249 100644 --- a/modules/home-manager/module.nix +++ b/modules/home-manager/module.nix @@ -1,15 +1,20 @@ -{osConfig, ...}: { +args @ { + osConfig, + lib, + ... +}: { # imports = [ # ./standalone.nix # ]; - - hostname = osConfig.networking.hostName; - keyboard = { - layout = osConfig.services.xserver.xkb.layout; - variant = osConfig.services.xserver.xkb.variant; - }; - theming = { - image = osConfig.theming.image; - scheme = osConfig.theming.scheme; + config = lib.mkIf (args ? nixosConfig) { + hostname = osConfig.networking.hostName; + keyboard = { + layout = osConfig.services.xserver.xkb.layout; + variant = osConfig.services.xserver.xkb.variant; + }; + theming = { + image = osConfig.theming.image; + scheme = osConfig.theming.scheme; + }; }; }