1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2024-08-18 14:54:44 +02:00
parent 7b2a024010
commit 6375d98a74
53 changed files with 112 additions and 852 deletions

View file

@ -6,7 +6,6 @@
flake-parts.url = "github:hercules-ci/flake-parts";
hardware.url = "github:NixOS/nixos-hardware";
agenix.url = "github:ryantm/agenix";
myvim.url = "github:lukaswrz/myvim";
};
outputs = {
@ -18,30 +17,29 @@
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux"];
flake = let
commonNixosSystem = name: class:
nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
attrName = name;
flake = {
nixosConfigurations = let
commonNixosSystem = name:
nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
attrName = name;
};
modules = [
inputs.agenix.nixosModules.default
./common
./hosts/${name}
({lib, ...}: {networking.hostName = lib.mkDefault name;})
];
};
modules = [
inputs.agenix.nixosModules.default
./common
./class/${class}
./hosts/${name}
({lib, ...}: {networking.hostName = lib.mkDefault name;})
];
};
in {
nixosConfigurations = builtins.mapAttrs commonNixosSystem {
glacier = "desktop";
flamingo = "desktop";
abacus = "server";
vessel = "server";
};
in
nixpkgs.lib.genAttrs [
"abacus"
"vessel"
]
commonNixosSystem;
};
perSystem = {