diff --git a/flake.nix b/flake.nix index 6302e6c..3e237ef 100644 --- a/flake.nix +++ b/flake.nix @@ -8,24 +8,11 @@ }; outputs = { nixpkgs, home-manager, ... }: { - nixosConfigurations = { - pc = nixpkgs.lib.nixosSystem { + nixosConfigurations = let + mkSystem = entrypoint: nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./nixos-configurations/pc - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - }; - } - ]; - }; - laptop = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./nixos-configurations/laptop + entrypoint home-manager.nixosModules.home-manager { home-manager = { @@ -35,6 +22,9 @@ } ]; }; + in { + pc = mkSystem ./nixos-configurations/pc; + laptop = mkSystem ./nixos-configurations/laptop; }; }; }