diff --git a/home/default.nix b/home/default.nix index ee8519e1..5cb0739a 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,6 +1,6 @@ { self, inputs, ... }: { - flake = + flake.homeConfigurations = let inherit (inputs.hm.lib) homeManagerConfiguration; @@ -8,19 +8,17 @@ extraSpecialArgs = { inherit inputs self; }; + pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; + + mkHome = + hostname: + homeManagerConfiguration { + inherit extraSpecialArgs pkgs; + modules = [ ./gwen/${hostname}.nix ]; + }; in { - homeConfigurations = { - "gwen@grovetender" = homeManagerConfiguration { - pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; - inherit extraSpecialArgs; - modules = [ ./gwen/grovetender.nix ]; - }; - "gwen@aurelionite" = homeManagerConfiguration { - pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; - inherit extraSpecialArgs; - modules = [ ./gwen/aurelionite.nix ]; - }; - }; + "gwen@grovetender" = mkHome "grovetender"; + "gwen@aurelionite" = mkHome "aurelionite"; }; }