Reduce redundancy in flake.nix, add new hm profile for desktops
This commit is contained in:
parent
20707d250e
commit
2d9dcf079a
7 changed files with 64 additions and 48 deletions
40
flake.nix
40
flake.nix
|
@ -51,29 +51,37 @@
|
|||
|
||||
inputs.flake-utils.lib.eachDefaultSystemPassThrough (system:
|
||||
with inputs; let
|
||||
mkNix = modules: channel: channel.lib.nixosSystem {
|
||||
inherit modules;
|
||||
mkNix = name: channel: channel.lib.nixosSystem {
|
||||
modules = [ (./hosts + "/${name}") ];
|
||||
specialArgs = inputs;
|
||||
};
|
||||
mkHome = modules: channel: hm.lib.homeManagerConfiguration {
|
||||
mkHome = channel: modules: hm.lib.homeManagerConfiguration {
|
||||
inherit modules;
|
||||
pkgs = channel.legacyPackages.${system};
|
||||
extraSpecialArgs = inputs;
|
||||
pkgs = builtins.getAttr system channel.legacyPackages;
|
||||
};
|
||||
|
||||
hostChannels = {
|
||||
tower = stable;
|
||||
|
||||
intuos = stable;
|
||||
jupiter = unstable;
|
||||
redmond = stable;
|
||||
|
||||
midas = stable;
|
||||
kitty = stable;
|
||||
prophet = stable;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
tower = mkNix [ ./hosts/tower ] stable;
|
||||
|
||||
intuos = mkNix [ ./hosts/intuos ] stable;
|
||||
jupiter = mkNix [ ./hosts/jupiter ] unstable;
|
||||
redmond = mkNix [ ./hosts/redmond ] stable;
|
||||
|
||||
midas = mkNix [ ./hosts/midas ] stable;
|
||||
kitty = mkNix [ ./hosts/kitty ] stable;
|
||||
prophet = mkNix [ ./hosts/prophet ] stable;
|
||||
};
|
||||
nixosConfigurations = builtins.mapAttrs (name: channel: mkNix name channel) hostChannels;
|
||||
|
||||
homeConfigurations.bun = mkHome [ ./modules/home ] stable;
|
||||
homeConfigurations = {
|
||||
default = mkHome stable [ ./modules/home ];
|
||||
full = mkHome stable [
|
||||
./modules/home
|
||||
{ home.guifull.enable = true; }
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue