diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-25 18:25:51 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-25 18:25:51 +0100 |
commit | d9ab6c7ea59d29af3ae8c29c7367fe0e8808f5db (patch) | |
tree | 4076dca44feeb7fccf90af3f9c9cc6e73b845c6f /hosts/by-name/server1 | |
parent | fix(treewide): Add constant uids and gids to each user and group (diff) | |
download | nixos-server-d9ab6c7ea59d29af3ae8c29c7367fe0e8808f5db.zip |
refactor(hosts): Use a `by-name` structure and construct all host depended values
This allows us to outsource the host-handling from the `flake.nix` file.
Diffstat (limited to '')
-rw-r--r-- | hosts/by-name/server1/configuration.nix (renamed from hosts/server1/configuration.nix) | 14 | ||||
-rw-r--r-- | hosts/by-name/server1/hardware.nix (renamed from hosts/server1/hardware.nix) | 0 | ||||
-rw-r--r-- | hosts/by-name/server1/networking.nix (renamed from hosts/server1/networking.nix) | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/hosts/server1/configuration.nix b/hosts/by-name/server1/configuration.nix index e21327e..6bb1067 100644 --- a/hosts/server1/configuration.nix +++ b/hosts/by-name/server1/configuration.nix @@ -3,7 +3,7 @@ ./networking.nix # network configuration that just works ./hardware.nix - ../../system + ../../../system ]; vhack = { @@ -22,7 +22,19 @@ nix-sync.enable = true; openssh.enable = true; peertube.enable = true; + postgresql.enable = true; redlib.enable = true; + users.enable = true; + persist = { + enable = true; + directories = [ + "/var/log" + + # TODO(@bpeetz): Instead of persisting that, encode each uid/gid directly in the + # config. <2024-12-24> + "/var/lib/nixos" + ]; + }; }; boot.tmp.cleanOnBoot = true; diff --git a/hosts/server1/hardware.nix b/hosts/by-name/server1/hardware.nix index 9abc64c..9abc64c 100644 --- a/hosts/server1/hardware.nix +++ b/hosts/by-name/server1/hardware.nix diff --git a/hosts/server1/networking.nix b/hosts/by-name/server1/networking.nix index cd0484f..dd9b9af 100644 --- a/hosts/server1/networking.nix +++ b/hosts/by-name/server1/networking.nix @@ -44,6 +44,8 @@ }; }; }; + + # cat /sys/class/net/eth0/address services.udev.extraRules = '' ATTR{address}=="66:22:6d:82:93:9b", NAME="eth0" ''; |