summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorJakub Stachurski <jakub@wilkuu.nl>2026-07-21 20:27:22 +0200
committerJakub Stachurski <jakub@wilkuu.nl>2026-07-21 20:27:22 +0200
commit381984fc596c3cf268d4bcf061164158fbcfb95a (patch)
treebe2971742215333a052c6cb2c363e5f988b566ad /flake.nix
parent4dbacb6c6e712015bde14a2276cf70e47e317164 (diff)
Move host definition to inventory.nix
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix68
1 files changed, 12 insertions, 56 deletions
diff --git a/flake.nix b/flake.nix
index f48bffe..f7a6677 100644
--- a/flake.nix
+++ b/flake.nix
@@ -51,13 +51,13 @@
nixpkgs,
treefmt-nix,
disko,
- stalwart-nix,
sops-nix,
home-manager,
...
}@inputs:
let
lib = nixpkgs.lib;
+ inventory = (import ./inventory.nix) { inherit inputs; } ;
systems = [
"x86_64-linux"
"x86_64-darwin"
@@ -80,7 +80,7 @@
}
))
{
- "x86_64-linux".full-iso = self.nixosConfigurations.full-iso.config.system.build.isoImage;
+ # "x86_64-linux".full-iso = self.nixosConfigurations.full-iso.config.system.build.isoImage;
}
);
@@ -89,67 +89,23 @@
# for `nix flake check`
checks = forAllSystems (_: system: { formatting = treefmt.${system}.config.build.check self; });
- nixosConfigurations = {
- apocalypse = nixpkgs.lib.nixosSystem {
+ nixosConfigurations = lib.mapAttrs (
+ self_name: host: lib.nixosSystem {
specialArgs = {
inherit inputs;
+ inherit inventory;
+ inherit self_name;
};
- system = "x86_64-linux";
+ inherit (host) system;
modules = [
./modules
- ./hosts/apocalypse
- ./users/wilkuu.nix
- stalwart-nix.nixosModules.default
+ ./hosts/${self_name}
home-manager.nixosModules.default
sops-nix.nixosModules.default
- ];
- };
- full-iso = nixpkgs.lib.nixosSystem {
- specialArgs = {
- inherit inputs;
- isoImage.squashfsCompression = "lz4";
- isoImage.isoLabel = "NIX_WQ_ISO";
- };
- system = "x86_64-linux";
- modules = [
- ./modules
- ./hosts/full-iso
- ./users/live-user.nix
- home-manager.nixosModules.default
- sops-nix.nixosModules.default
- ];
- };
- omega-relay = nixpkgs.lib.nixosSystem {
- specialArgs = {
- inherit inputs;
- };
- system = "x86_64-linux";
- modules = [
- ./modules
- ./users/wilkuu-server.nix
- ./hosts/omega-relay
- home-manager.nixosModules.default
- disko.nixosModules.disko
- stalwart-nix.nixosModules.default
- sops-nix.nixosModules.default
- ];
-
- };
- tacitus = nixpkgs.lib.nixosSystem {
- specialArgs = {
- inherit inputs;
- };
- system = "x86_64-linux";
- modules = [
- ./modules
- ./users/wilkuu-server.nix
- ./hosts/tacitus
- home-manager.nixosModules.default
disko.nixosModules.disko
- sops-nix.nixosModules.default
- ];
-
- };
- };
+ ] ++ host.nix-modules;
+ }
+ )
+ (lib.filterAttrs (n: h: (h.nix && h.type != "live")) inventory);
};
}