Simplify flake readability, move NixOS configs outside of flake-utils
This commit is contained in:
parent
a4d6a7663c
commit
215ad6b1a7
3 changed files with 33 additions and 45 deletions
65
flake.nix
65
flake.nix
|
@ -52,40 +52,39 @@
|
|||
|
||||
outputs = inputs: with inputs;
|
||||
|
||||
flake-utils.lib.eachDefaultSystemPassThrough (system:
|
||||
let
|
||||
mkNix = name: channel: channel.lib.nixosSystem {
|
||||
modules = [ (./hosts + "/${name}") ];
|
||||
specialArgs = inputs;
|
||||
};
|
||||
mkHome = extraModules: hm.lib.homeManagerConfiguration {
|
||||
modules = [
|
||||
./modules/home
|
||||
{ targets.genericLinux.enable = true; }
|
||||
] ++ extraModules;
|
||||
extraSpecialArgs = inputs;
|
||||
pkgs = builtins.getAttr system stable.legacyPackages;
|
||||
};
|
||||
let
|
||||
mkNix = name: channel: channel.lib.nixosSystem {
|
||||
modules = [ (./hosts + "/${name}") ];
|
||||
specialArgs = inputs;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = builtins.mapAttrs (name: channel: mkNix name channel) {
|
||||
tower = stable;
|
||||
detritus = stable;
|
||||
hidden = stable;
|
||||
|
||||
hostChannels = {
|
||||
tower = stable;
|
||||
detritus = stable;
|
||||
hidden = stable;
|
||||
intuos = stable;
|
||||
jupiter = unstable;
|
||||
|
||||
intuos = stable;
|
||||
jupiter = unstable;
|
||||
midas = stable;
|
||||
kitty = stable;
|
||||
prophet = stable;
|
||||
};
|
||||
}
|
||||
|
||||
midas = stable;
|
||||
kitty = stable;
|
||||
prophet = stable;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = builtins.mapAttrs (name: channel: mkNix name channel) hostChannels;
|
||||
|
||||
homeConfigurations = {
|
||||
default = mkHome [ ];
|
||||
desktop = mkHome [{ home.guifull.enable = true; }];
|
||||
};
|
||||
}
|
||||
);
|
||||
// flake-utils.lib.eachDefaultSystemPassThrough (system: let
|
||||
mkHome = extraModules: hm.lib.homeManagerConfiguration {
|
||||
modules = [
|
||||
./modules/home
|
||||
{ targets.genericLinux.enable = true; }
|
||||
] ++ extraModules;
|
||||
extraSpecialArgs = inputs;
|
||||
pkgs = builtins.getAttr system stable.legacyPackages;
|
||||
};
|
||||
in {
|
||||
homeConfigurations = {
|
||||
default = mkHome [ ];
|
||||
desktop = mkHome [{ home.guifull.enable = true; }];
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./generic
|
||||
./guifull
|
||||
];
|
||||
imports = [ ./guifull ];
|
||||
|
||||
options.home = with lib; {
|
||||
desktop.enable = mkEnableOption "Desktop programs and services";
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf config.targets.genericLinux.enable {
|
||||
home = {
|
||||
sessionVariables.PATH = "$HOME/.nix-profile/bin:$PATH";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue