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

View File

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

View File

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