diff --git a/emmathorpe/home-manager-module.nix b/emmathorpe/home-manager-module.nix new file mode 100644 index 0000000..a31777c --- /dev/null +++ b/emmathorpe/home-manager-module.nix @@ -0,0 +1,14 @@ +{config, pkgs, lib, ...}: + +{ + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + +lib.mkIf ( profile == "work" ) { + home-manager.users.emmathorpe.imports = [ ./home.nix ../system/modules/work/default.nix ]; +}; +lib.mkIf ( profile == "home" ) { + home-manager.users.emmathorpe.imports = [ ./home.nix ]; +}; + +} diff --git a/flake.nix b/flake.nix index 22bb177..60245a5 100644 --- a/flake.nix +++ b/flake.nix @@ -35,23 +35,18 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.emmathorpe = import ./emmathorpe/home.nix; - home-manager.users.emmathorpe = import ./system/modules/work/default.nix; } ]; }; nixosConfigurations.emmathorpe-edaas = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; + let profile = "work"; modules = [ ./system/machine/EDaaS/configuration.nix ./emmathorpe/user.nix ./emmathorpe/swaywm.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.emmathorpe = import ./emmathorpe/home.nix; - } + ./emmathorpe/home-manager-module.nix ]; }; };