move filesystem imports to module level

This commit is contained in:
2025-07-16 23:20:28 +02:00
parent 57ba310000
commit 21e54d968e
4 changed files with 62 additions and 12 deletions

View File

@@ -20,7 +20,6 @@
./program-tmux.nix
# Hardware
./nfs-mount.nix
./hwaccel.nix
# Services
@@ -31,20 +30,19 @@
++ lib.optionals (config.vars.host_type == "nas") [ ./service-zrepl.nix ]
++ lib.optionals (config.vars.host_type == "worker") [ ./nfs-mount.nix ./keepalived.nix ];
# Use the systemd-boot EFI boot loader and enable that sweet zfs stuff.
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
boot.supportedFilesystems = [ "nfs" ]; # "zfs"
boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; };
boot.kernel.sysctl = { "net.ipv6.conf.all.forwarding" = 1; };
# Enable IP forwarding for NAT (used in wireguard.nix) and load specific modules.
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
boot.kernelModules = [ "rbd" "nbd" ];
# boot.zfs.forceImportRoot = false;
# boot.zfs.extraPools = [ "SERVICE" ];
# services.zfs.autoScrub.enable = true;
networking.hostName = config.vars.hostname; # Define your hostname.
networking.hostId = config.vars.hostid; # Define your hostID - Needs to be unique!.
networking.hostName = config.vars.hostname;
networking.hostId = config.vars.hostid;
networking = {
interfaces = let
primaryInterface = lib.head config.vars.interfaces;
@@ -63,7 +61,7 @@
networking.defaultGateway = {
address = "192.168.178.1";
interface = lib.head config.vars.interfaces;
interface = lib.head config.vars.interfaces; # Sticking with the primary interface
};
networking.nameservers = [ "192.168.178.10" "9.9.9.9" ];