diff --git a/nixos/configuration.nix b/nixos/configuration.nix index a92078d..f6b01d9 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -99,6 +99,7 @@ in }; networking.hostName = meta.hostname; + networking.hostId = meta.hostId; networking.interfaces.eth0.ipv4.addresses = [ { diff --git a/nixos/disk-config.nix b/nixos/disk-config.nix index 8907f5d..c7340fb 100644 --- a/nixos/disk-config.nix +++ b/nixos/disk-config.nix @@ -1,23 +1,21 @@ -{ disks ? [ "/dev/nvme0n1" ], ... }: { disko.devices = { disk = { x = { - device = builtins.elemAt disks 0; + device = "/dev/nvme0n1"; type = "disk"; content = { - type = "table"; - format = "gpt"; + type = "gpt"; partitions = { # boot ESP = { - start = "1MiB"; - end = "500MiB"; - bootable = true; + size = "64M"; + type = "EF00"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; }; }; # root @@ -35,7 +33,6 @@ zpool = { zroot = { type = "zpool"; - mode = "mirror"; options.cachefile = "none"; rootFsOptions = { compression = "zstd"; diff --git a/nixos/flake.nix b/nixos/flake.nix index ce05087..79392f1 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -22,14 +22,20 @@ outputs = { self, nixpkgs, nixvim, home-manager, disko, sops-nix, quasiSecrets }@inputs: let nodes = [ - "nixos-homelab-00" + { + name = "nixos-homelab-00"; + hostId = "3884D2F1"; + } ]; in { - nixosConfigurations = builtins.listToAttrs (map (name: { - name = name; + nixosConfigurations = builtins.listToAttrs (map (node: { + name = node.name; value = nixpkgs.lib.nixosSystem { specialArgs = { - meta = { hostname = name; }; + meta = { + hostname = node.name; + hostId = node.hostId; + }; }; system = "x86_64-linux"; modules = [