From bed08ad165c4b081cc2e57010e37e7e427b9f428 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Tue, 17 Jun 2025 15:28:07 +0100 Subject: [PATCH] fix: try breaking it out different --- emmathorpe/home-manager-module.nix | 14 ++++++++++++++ flake.nix | 9 ++------- 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 emmathorpe/home-manager-module.nix 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 ]; }; };