fix: multiple node support
This commit is contained in:
@@ -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 = [
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
name = "kube";
|
||||||
main = nixpkgs.lib.nixosSystem {
|
architecture = "x86_64-linux";
|
||||||
system = "x86_64-linux";
|
}
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosConfigurations = builtins.listToAttrs (
|
||||||
|
map (
|
||||||
|
node:
|
||||||
|
{
|
||||||
|
name = node.name;
|
||||||
|
value = nixpkgs.lib.nixosSystem {
|
||||||
|
system = node.architecture;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
meta = {
|
meta = {
|
||||||
hostname = "kube";
|
hostname = node.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
./configuration.nix
|
./${node.name}-configuration.nix
|
||||||
./hardware-configuration.nix
|
./${node.name}-hardware-configuration.nix
|
||||||
|
./${node.name}-disk-config.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
nodes
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
|
||||||
./disk-config.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user