From 4a0d01a460ebc448baf9052d3a3e9f7c59f462fd Mon Sep 17 00:00:00 2001 From: Jacob Hinkle Date: Mon, 20 Nov 2023 11:45:56 -0500 Subject: [PATCH] Set up NFS and tailscale on buck --- machines/buck/configuration.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/machines/buck/configuration.nix b/machines/buck/configuration.nix index 0659fe1..aec9830 100644 --- a/machines/buck/configuration.nix +++ b/machines/buck/configuration.nix @@ -165,12 +165,16 @@ enable = true; }; + rpcbind.enable = true; # for NFS + syncthing = import ./syncthing.nix; udev.extraRules = '' ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness" ''; + tailscale.enable = true; + # Enable the X11 windowing system. services.xserver.enable = true; xserver = { enable = true; @@ -209,6 +213,31 @@ services.thermald.enable = true; services.fwupd.enable = true; + systemd.mounts = let + nfsOpts = { + type = "nfs"; + mountConfig = { + Options = "noatime"; + }; + }; + nas = "100.64.0.5"; # synnas over tailscale + in [ + (nfsOpts // { + what = "${nas}:/homes/jacob/Photos"; + where = "/nas/photos"; + }) + ]; + systemd.automounts = let + autoMountOpts = { + wantedBy = [ "multi-user.target" ]; + automountConfig = { + TimeoutIdleSec = "600"; + }; + }; + in [ + (autoMountOpts // { where = "/nas/photos"; }) + ]; + # Enable the OpenSSH daemon. # services.openssh.enable = true;