From ffc6e57b23e46ec5306344f17a10a2893b9b8935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Tue, 5 Mar 2024 15:42:52 +0100 Subject: [PATCH] Add nfs mount --- hosts/gunter/default.nix | 1 + hosts/gunter/nfs.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 hosts/gunter/nfs.nix diff --git a/hosts/gunter/default.nix b/hosts/gunter/default.nix index 10b0e2a..a277375 100644 --- a/hosts/gunter/default.nix +++ b/hosts/gunter/default.nix @@ -3,6 +3,7 @@ ./configuration.nix ./hardware-configuration.nix ./steamuser.nix + ./nfs.nix ../../system ../../home ]; diff --git a/hosts/gunter/nfs.nix b/hosts/gunter/nfs.nix new file mode 100644 index 0000000..fffc689 --- /dev/null +++ b/hosts/gunter/nfs.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: { + services.rpcbind.enable = true; + systemd.mounts = [{ + type = "nfs4"; + mountConfig = { + Options = "rw,soft,noatime"; + }; + what = "nas.home.2rjus.net:/mnt/hdd-pool/media"; + where = "/mnt/nas/media"; + }]; + + systemd.automounts = [{ + wantedBy = [ "multi-user.target" ]; + automountConfig = { + TimeoutIdleSec = "5min"; + }; + where = "/mnt/nas/media"; + }]; +}