Avoid duplication in flake code

This commit is contained in:
thiloho
2023-06-27 17:52:44 +02:00
parent a0018f43ae
commit efc6f86ddd

View File

@@ -8,24 +8,11 @@
}; };
outputs = { nixpkgs, home-manager, ... }: { outputs = { nixpkgs, home-manager, ... }: {
nixosConfigurations = { nixosConfigurations = let
pc = nixpkgs.lib.nixosSystem { mkSystem = entrypoint: nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./nixos-configurations/pc entrypoint
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
}
];
};
laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nixos-configurations/laptop
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager = { home-manager = {
@@ -35,6 +22,9 @@
} }
]; ];
}; };
in {
pc = mkSystem ./nixos-configurations/pc;
laptop = mkSystem ./nixos-configurations/laptop;
}; };
}; };
} }