diff --git a/modules2/home-manager/nixos.nix b/modules2/home-manager/nixos.nix index ecfa62e6..129c0a95 100644 --- a/modules2/home-manager/nixos.nix +++ b/modules2/home-manager/nixos.nix @@ -6,28 +6,33 @@ }: { - flake.modules.nixos.pc = { - imports = [ inputs.home-manager.nixosModules.home-manager ]; + flake.modules.nixos = { + workstation = { + imports = [ inputs.home-manager.nixosModules.home-manager ]; - home-manager = { - extraSpecialArgs.hasGlobalPkgs = true; - useGlobalPkgs = true; + home-manager = { + extraSpecialArgs.hasGlobalPkgs = true; + useGlobalPkgs = true; - # https://github.com/nix-community/home-manager/issues/6770 - # useUserPackages = true; + # https://github.com/nix-community/home-manager/issues/6770 + # useUserPackages = true; - users.${config.flake.meta.owner.username}.imports = [ - ( - { osConfig, ... }: + users.${config.flake.meta.owner.username}.imports = [ + ( + { osConfig, ... }: - { - home.stateVersion = lib.mkForce osConfig.system.stateVersion; - } - ) + { + home.stateVersion = lib.mkForce osConfig.system.stateVersion; + } + ) - config.flake.modules.homeManager.base - config.flake.modules.homeManager.gui - ]; + config.flake.modules.homeManager.base + ]; + }; }; + + pc.home-manager.users.${config.flake.meta.owner.username}.imports = [ + config.flake.modules.homeManager.gui + ]; }; } diff --git a/modules2/hosts/PW05CH3L/imports.nix b/modules2/hosts/PW05CH3L/imports.nix new file mode 100644 index 00000000..37ab440e --- /dev/null +++ b/modules2/hosts/PW05CH3L/imports.nix @@ -0,0 +1,7 @@ +{ config, ... }: + +{ + flake.modules.nixos."hosts/PW05CH3L".imports = with config.flake.modules.nixos; [ + workstation + ]; +} diff --git a/modules2/nixos-configurations.nix b/modules2/nixos-configurations.nix index 0121160b..f6fccfdc 100644 --- a/modules2/nixos-configurations.nix +++ b/modules2/nixos-configurations.nix @@ -61,7 +61,10 @@ modules = [ config.flake.modules.nixos."hosts/${hostname}" ]; }; - PW05CH3L = mkNixosConfiguration { hostname = "PW05CH3L"; }; + PW05CH3L = mkNixosConfiguration rec { + hostname = "PW05CH3L"; + modules = [ config.flake.modules.nixos."hosts/${hostname}" ]; + }; }; }; } diff --git a/modules2/pc.nix b/modules2/pc.nix new file mode 100644 index 00000000..c68d24fb --- /dev/null +++ b/modules2/pc.nix @@ -0,0 +1,7 @@ +{ config, ... }: + +{ + flake.modules.nixos.pc.imports = with config.flake.modules.nixos; [ + workstation + ]; +} diff --git a/modules2/workstation.nix b/modules2/workstation.nix new file mode 100644 index 00000000..0e4984a3 --- /dev/null +++ b/modules2/workstation.nix @@ -0,0 +1,3 @@ +{ + flake.modules.nixos.workstation = {}; +}