fix: multiple node support

This commit is contained in:
2025-04-19 22:40:36 -07:00
parent 40d8f3e30a
commit a3a9c62191
5 changed files with 33 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
{
description = "Homelab-test";
description = "Homelab";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
@@ -12,22 +12,38 @@
self,
nixpkgs,
disko,
}:
}@inputs:
let
nodes = [
{
nixosConfigurations = {
main = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
name = "kube";
architecture = "x86_64-linux";
}
];
in
{
nixosConfigurations = builtins.listToAttrs (
map (
node:
{
name = node.name;
value = nixpkgs.lib.nixosSystem {
system = node.architecture;
specialArgs = {
meta = {
hostname = "kube";
hostname = node.name;
};
};
modules = [
disko.nixosModules.disko
./configuration.nix
./hardware-configuration.nix
./${node.name}-configuration.nix
./${node.name}-hardware-configuration.nix
./${node.name}-disk-config.nix
];
};
};
}
nodes
)
);
};
}

View File

@@ -8,8 +8,6 @@
{
imports = [
./hardware-configuration.nix
./disk-config.nix
];
boot.loader.grub.enable = true;

View File

@@ -27,7 +27,7 @@
services.libinput.touchpad.naturalScrolling = true;
environment.systemPackages = with pkgs; [
dolphin
kdePackages.dolphin
vscode-fhs
pavucontrol
vlc