diff --git a/modules/linux/nixos/nfs-share.nix b/modules/linux/nixos/nfs-share.nix index 99ea7be..742e2c2 100644 --- a/modules/linux/nixos/nfs-share.nix +++ b/modules/linux/nixos/nfs-share.nix @@ -5,7 +5,7 @@ ... }: let auto_mount = pkgs.writeShellScriptBin "auto_mount" '' - timeout 1 ${pkgs.bash}/bin/bash -c ": < /dev/tcp/192.168.0.4/2049" + timeout 1 ${pkgs.bash}/bin/bash -c ": < /dev/tcp/192.168.0.5/2049" if [ $? -ne 0 ]; then systemctl stop mnt-share.automount @@ -24,7 +24,7 @@ in { config = lib.mkIf config.crony.nfs-share.enable { # Nfs share fileSystems."/mnt/share" = { - device = "192.168.0.4:/mnt/nfs"; + device = "192.168.0.5:/export/nfs"; fsType = "nfs"; options = ["_netdev" "noauto" "x-systemd.automount" "x-systemd.mount-timeout=10" "timeo=14" "x-systemd.idle-timeout=600"]; }; diff --git a/modules/servers/tyr/default.nix b/modules/servers/tyr/default.nix index 0f27b60..1bebe48 100644 --- a/modules/servers/tyr/default.nix +++ b/modules/servers/tyr/default.nix @@ -5,5 +5,6 @@ ./wallos.nix ./wireguard.nix ./secrets.nix + ./nfs-server.nix ]; } diff --git a/modules/servers/tyr/nfs-server.nix b/modules/servers/tyr/nfs-server.nix new file mode 100644 index 0000000..bba041e --- /dev/null +++ b/modules/servers/tyr/nfs-server.nix @@ -0,0 +1,9 @@ +{ + services.nfs.server = { + enable = true; + exports = '' + /export/nfs 192.168.0.0/24(rw,sync,no_subtree_check) 172.16.0.0/24(rw,sync,no_subtree_check) + ''; + }; + networking.firewall.allowedTCPPorts = [2049]; +}