From 35b60c250d10aaaf09d5c311c1796572ff767ee0 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Thu, 11 Aug 2022 15:13:23 -0700 Subject: [PATCH] troubleshooting NFS shares --- nix/deployments/nixops.nix | 13 ++----------- nix/system/framework/hardware-configuration.nix | 6 ++++++ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/nix/deployments/nixops.nix b/nix/deployments/nixops.nix index 3662f51..64139d4 100644 --- a/nix/deployments/nixops.nix +++ b/nix/deployments/nixops.nix @@ -77,8 +77,8 @@ in services.nfs.server.enable = true; services.nfs.server.exports = '' - /export 192.168.1.0/24(insecure,crossmnt,fsid=0) - /export/storage 192.168.1.0/24(insecure) + /export 192.168.1.0/24(insecure,crossmnt,no_subtree_check,fsid=0) + /export/storage 192.168.1.0/24(rw,sync,nohide,insecure) ''; networking.firewall = { @@ -121,14 +121,5 @@ in ]; }; }; - - systemd.services.my-service = { - after = [ "wireguard-key.service" ]; - wants = [ "wireguard-key.service" ]; - script = '' - export MY_SECRET=$(cat /run/keys/my-secret) - run-my-program - ''; - }; }; } diff --git a/nix/system/framework/hardware-configuration.nix b/nix/system/framework/hardware-configuration.nix index bb4867d..d4e22a5 100644 --- a/nix/system/framework/hardware-configuration.nix +++ b/nix/system/framework/hardware-configuration.nix @@ -26,6 +26,12 @@ fsType = "vfat"; }; + fileSystems."/storage" = { + device = "192.168.1.168:/storage"; + fsType = "nfs"; + options = [ "x-systemd.automount" "noauto" ]; + }; + swapDevices = [{ device = "/dev/disk/by-uuid/97c769a2-55da-475a-8dc0-d74d8bbde514"; }];