fix: multiple node support
This commit is contained in:
@@ -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
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./disk-config.nix
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
@@ -27,7 +27,7 @@
|
||||
services.libinput.touchpad.naturalScrolling = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
dolphin
|
||||
kdePackages.dolphin
|
||||
vscode-fhs
|
||||
pavucontrol
|
||||
vlc
|
||||
|
||||
Reference in New Issue
Block a user