Less overhead for new homelab devices

This commit is contained in:
ari committed 2024-08-02 13:45:23 -04:00
1 parent 4cc3978057
commit 699d47f4bd
1 file changed
+58 -57
+58 -57
View File
@@ -105,15 +105,50 @@
}; };
}; };
makeHLService = lib.makeNixOsModuleMaker hlCommonSettings; makeHLService = lib.makeNixOsModuleMaker hlCommonSettings;
homelabMachines = [
"hl-bigbox1"
"hl-minipc1"
"hl-minipc2"
"hl-terra1"
];
homeLabModules = builtins.map
(name: {
name = name;
value = makeHLService {
hostName = name;
configuration = (import (./hosts + "/${name}.nix") { user = user; });
systemStateVersion = "24.05";
};
})
homelabMachines;
in in
{ {
lib = lib; lib = lib;
formatter = formatter =
eachSystem (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt); eachSystem (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
# MacBooks Setups
# -------------
darwinConfigurations."asosnovsky-mac" = lib.makeDarwinModule {
user = sumoUser;
systemStateVersion = 4;
localNixCaches = localNixCaches;
system = "x86_64-darwin";
hostName = "asosnovsky-mac";
home-manager = {
enable = true;
enableDevelopmentKit = true;
version = homeManagerVersion;
};
configuration =
(import ./hosts/asosnovsky-mac.nix { user = sumoUser; });
};
nixosConfigurations = {
# NIXOS Framework Setups # NIXOS Framework Setups
# ------------- # -------------
nixosConfigurations."fwbook" = lib.makeNixOsModule { fwbook = lib.makeNixOsModule {
system = "x86_64-linux"; system = "x86_64-linux";
user = user; user = user;
systemStateVersion = "23.11"; systemStateVersion = "23.11";
@@ -156,64 +191,30 @@
]; ];
}; };
}; };
} // builtins.listToAttrs homeLabModules;
# MacBooks Setups # # Homelab
# ------------- # # -------------
darwinConfigurations."asosnovsky-mac" = lib.makeDarwinModule { # hl-bigbox1 = makeHLService {
user = sumoUser;
systemStateVersion = 4;
localNixCaches = localNixCaches;
system = "x86_64-darwin";
hostName = "asosnovsky-mac";
home-manager = {
enable = true;
enableDevelopmentKit = true;
version = homeManagerVersion;
};
configuration =
(import ./hosts/asosnovsky-mac.nix { user = sumoUser; });
};
# NIXOS Homelab - BIGBOX1
# -------------
nixosConfigurations."hl-bigbox1" = makeHLService {
hostName = "hl-bigbox1";
configuration = (import ./hosts/hl-bigbox1.nix { user = user; });
systemStateVersion = "24.05";
};
# unstableLib.makeNixOsModule (hlCommonSettings // {
# systemStateVersion = "24.05";
# hostName = "hl-bigbox1"; # hostName = "hl-bigbox1";
# home-manager = {
# enable = true;
# enableDevelopmentKit = false;
# version = "24.11";
# };
# configuration = (import ./hosts/hl-bigbox1.nix { user = user; }); # configuration = (import ./hosts/hl-bigbox1.nix { user = user; });
# }); # systemStateVersion = "24.05";
# };
# NIXOS Homelab - minipc1 # hl-minipc1 = makeHLService {
# ------------- # hostName = "hl-minipc1";
nixosConfigurations."hl-minipc1" = makeHLService { # configuration = (import ./hosts/hl-minipc1.nix { user = user; });
hostName = "hl-minipc1"; # systemStateVersion = "23.11";
configuration = (import ./hosts/hl-minipc1.nix { user = user; }); # };
systemStateVersion = "23.11"; # hl-minipc2 = makeHLService {
}; # hostName = "hl-minipc2";
# configuration = (import ./hosts/hl-minipc2.nix { user = user; });
# NIXOS Homelab - minipc2 # systemStateVersion = "24.05";
# ------------- # };
nixosConfigurations."hl-minipc2" = makeHLService { # hl-terra1 = makeHLService {
hostName = "hl-minipc2"; # hostName = "hl-terra1";
configuration = (import ./hosts/hl-minipc2.nix { user = user; }); # configuration = (import ./hosts/hl-terra1.nix { user = user; });
systemStateVersion = "24.05"; # systemStateVersion = "24.05";
}; # };
# };
# NIXOS Homelab - terramaster 1
# -------------
nixosConfigurations."hl-terra1" = makeHLService {
hostName = "hl-terra1";
configuration = (import ./hosts/hl-terra1.nix { user = user; });
systemStateVersion = "24.05";
};
}; };
} }