diff options
Diffstat (limited to 'hosts/poweredge-pro/configuration.nix')
| -rw-r--r-- | hosts/poweredge-pro/configuration.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/hosts/poweredge-pro/configuration.nix b/hosts/poweredge-pro/configuration.nix new file mode 100644 index 0000000..f3ea1fb --- /dev/null +++ b/hosts/poweredge-pro/configuration.nix @@ -0,0 +1,62 @@ +{ config, lib, pkgs, ... }: { + imports = [ + ./cgit.nix + ./dns.nix + ./embedtube.nix + ./filebrowser.nix + ./fileshares.nix + ./key.nix + ./networking.nix + ./searxng.nix + ]; + + # Setup bootloader + boot._loader.enable = true; + + # Enable common options + _archetypes = { + profiles = { + headless = { + enable = true; + home.users.timmy.enable = true; + }; + zfs.enable = true; + #cuda.enable = true; + }; + collections = { + virtualization.enable = true; + development.docker.enable = true; + }; + }; + + # Import zfs pools + boot.zfs.extraPools = [ "VMDisk" "Storage" ]; + + # Workaround for docker + libvirt bug + systemd.services.bridge-nf-off = { + description = "Keep bridged VM traffic out of the IP netfilter path"; + after = [ "docker.service" ]; + partOf = [ "docker.service" ]; + wantedBy = [ "multi-user.target" "docker.service" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + }; + script = '' + ${pkgs.kmod}/bin/modprobe br_netfilter 2>/dev/null || true + for k in iptables ip6tables arptables; do + echo 0 > /proc/sys/net/bridge/bridge-nf-call-$k 2>/dev/null || true + done + ''; + }; + + networking.firewall.checkReversePath = "loose"; + + # Enable user timmy + _users.timmy.enable = true; + + # Without this, "ZFS requires networking.hostId to be set" will be raised + networking.hostId = "2c7d6b03"; + + system.stateVersion = "26.05"; +} |
