From e773124faeb7175e2309cea44aaa47a58dc5447f Mon Sep 17 00:00:00 2001 From: Steffen Date: Wed, 23 Jul 2025 12:28:28 +0200 Subject: [PATCH] cachefilesd added for nfs caching --- nfs-mount.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nfs-mount.nix b/nfs-mount.nix index 41dafb3..98ddef7 100644 --- a/nfs-mount.nix +++ b/nfs-mount.nix @@ -1,12 +1,16 @@ { config, pkgs, ... }: { - - # Add ZFS and NFS support to the initramfs so it can be mounted at boot. + # Add NFS support to the initramfs so it can be mounted at boot. boot.supportedFilesystems = [ "nfs" ]; + services.cachefilesd = { + enable = true; + cacheDir = "/data/cache"; + }; + systemd.mounts = [{ type = "nfs"; mountConfig = { - Options = "noatime"; + Options = "noatime,fsc"; }; what = "${config.vars.nfs_server}:${config.vars.nfs_volume}"; where = config.vars.nfs_mount; @@ -20,4 +24,4 @@ where = config.vars.nfs_mount; }]; -} \ No newline at end of file +}