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, ... }: {
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;
};
};
}