flake: slight refactor of overlay handling

This commit is contained in:
Jez Cope 2022-01-12 14:39:16 +00:00
parent b657d60cd9
commit caa9b4db8d
1 changed files with 17 additions and 8 deletions

View File

@ -14,10 +14,18 @@
};
outputs = { self, nixpkgs, home-manager, nur, emacs-overlay, ... }@inputs:
with nixpkgs.lib; {
nixosConfigurations = genAttrs [ "arianrhod" "gwydion" ] (hostName:
let
inherit (nixpkgs.lib) genAttrs nixosSystem;
system = "x86_64-linux";
hosts = [ "arianrhod" "gwydion" ];
overlay = import ./overlay.nix;
in {
inherit overlay;
nixosConfigurations = genAttrs hosts (hostName:
nixosSystem {
system = "x86_64-linux";
inherit system;
modules = [
./profiles
./configuration.nix
@ -25,15 +33,16 @@
(./secrets + "/${hostName}.nix")
{
nixpkgs.overlays =
[ (import ./overlay.nix) nur.overlay emacs-overlay.overlay ];
nixpkgs.overlays = [ overlay nur.overlay emacs-overlay.overlay ];
}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jez = import ./home;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.jez = import ./home;
};
}
];
specialArgs = { inherit inputs hostName; };