Simplify flake readability, move NixOS configs outside of flake-utils

This commit is contained in:
Bun 2025-05-31 17:47:49 -04:00
parent a4d6a7663c
commit 215ad6b1a7
3 changed files with 33 additions and 45 deletions

View file

@ -52,40 +52,39 @@
outputs = inputs: with inputs; outputs = inputs: with inputs;
flake-utils.lib.eachDefaultSystemPassThrough (system: let
let mkNix = name: channel: channel.lib.nixosSystem {
mkNix = name: channel: channel.lib.nixosSystem { modules = [ (./hosts + "/${name}") ];
modules = [ (./hosts + "/${name}") ]; specialArgs = inputs;
specialArgs = inputs; };
}; in {
mkHome = extraModules: hm.lib.homeManagerConfiguration { nixosConfigurations = builtins.mapAttrs (name: channel: mkNix name channel) {
modules = [ tower = stable;
./modules/home detritus = stable;
{ targets.genericLinux.enable = true; } hidden = stable;
] ++ extraModules;
extraSpecialArgs = inputs;
pkgs = builtins.getAttr system stable.legacyPackages;
};
hostChannels = { intuos = stable;
tower = stable; jupiter = unstable;
detritus = stable;
hidden = stable;
intuos = stable; midas = stable;
jupiter = unstable; kitty = stable;
prophet = stable;
};
}
midas = stable; // flake-utils.lib.eachDefaultSystemPassThrough (system: let
kitty = stable; mkHome = extraModules: hm.lib.homeManagerConfiguration {
prophet = stable; modules = [
}; ./modules/home
in { { targets.genericLinux.enable = true; }
nixosConfigurations = builtins.mapAttrs (name: channel: mkNix name channel) hostChannels; ] ++ extraModules;
extraSpecialArgs = inputs;
homeConfigurations = { pkgs = builtins.getAttr system stable.legacyPackages;
default = mkHome [ ]; };
desktop = mkHome [{ home.guifull.enable = true; }]; in {
}; homeConfigurations = {
} default = mkHome [ ];
); desktop = mkHome [{ home.guifull.enable = true; }];
};
});
} }

View file

@ -1,9 +1,6 @@
{ lib, ... }: { lib, ... }:
{ {
imports = [ imports = [ ./guifull ];
./generic
./guifull
];
options.home = with lib; { options.home = with lib; {
desktop.enable = mkEnableOption "Desktop programs and services"; desktop.enable = mkEnableOption "Desktop programs and services";

View file

@ -1,8 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkIf config.targets.genericLinux.enable {
home = {
sessionVariables.PATH = "$HOME/.nix-profile/bin:$PATH";
};
};
}