flake.nix: fix usage of common nixos module/overlay list

This commit is contained in:
Oystein Kristoffer Tveit 2024-03-24 02:20:44 +01:00
parent fe4dd21acb
commit 64c7e3e365
1 changed files with 7 additions and 23 deletions

View File

@ -53,16 +53,14 @@
modules = [ modules = [
./hosts/${name}/configuration.nix ./hosts/${name}/configuration.nix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
]; ] ++ config.modules or [];
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [ overlays = [ ] ++ config.overlays or [ ];
inputs.pvv-calendar-bot.overlays.${system}.default
];
}; };
} }
config (removeAttrs config [ "modules" "overlays" ])
); );
stableNixosConfig = nixosConfig nixpkgs; stableNixosConfig = nixosConfig nixpkgs;
@ -70,19 +68,16 @@
in { in {
bicep = stableNixosConfig "bicep" { bicep = stableNixosConfig "bicep" {
modules = [ modules = [
./hosts/bicep/configuration.nix
sops-nix.nixosModules.sops
inputs.matrix-next.nixosModules.default inputs.matrix-next.nixosModules.default
inputs.pvv-calendar-bot.nixosModules.default inputs.pvv-calendar-bot.nixosModules.default
]; ];
overlays = [
inputs.pvv-calendar-bot.overlays.x86_64-linux.default
];
}; };
bekkalokk = stableNixosConfig "bekkalokk" { }; bekkalokk = stableNixosConfig "bekkalokk" { };
bob = stableNixosConfig "bob" { bob = stableNixosConfig "bob" {
modules = [ modules = [
./hosts/bob/configuration.nix
sops-nix.nixosModules.sops
disko.nixosModules.disko disko.nixosModules.disko
{ disko.devices.disk.disk1.device = "/dev/vda"; } { disko.devices.disk.disk1.device = "/dev/vda"; }
]; ];
@ -93,28 +88,17 @@
brzeczyszczykiewicz = stableNixosConfig "brzeczyszczykiewicz" { brzeczyszczykiewicz = stableNixosConfig "brzeczyszczykiewicz" {
modules = [ modules = [
./hosts/brzeczyszczykiewicz/configuration.nix
sops-nix.nixosModules.sops
inputs.grzegorz.nixosModules.grzegorz-kiosk inputs.grzegorz.nixosModules.grzegorz-kiosk
inputs.grzegorz-clients.nixosModules.grzegorz-webui inputs.grzegorz-clients.nixosModules.grzegorz-webui
]; ];
}; };
georg = stableNixosConfig "georg" { georg = stableNixosConfig "georg" {
modules = [ modules = [
./hosts/georg/configuration.nix
sops-nix.nixosModules.sops
inputs.grzegorz.nixosModules.grzegorz-kiosk inputs.grzegorz.nixosModules.grzegorz-kiosk
inputs.grzegorz-clients.nixosModules.grzegorz-webui inputs.grzegorz-clients.nixosModules.grzegorz-webui
]; ];
}; };
buskerud = stableNixosConfig "buskerud" { buskerud = stableNixosConfig "buskerud" { };
modules = [
./hosts/buskerud/configuration.nix
sops-nix.nixosModules.sops
];
};
}; };
devShells = forAllSystems (system: { devShells = forAllSystems (system: {