From c849d7c36e4b0922db0c0794e1a7a0357bc20aa3 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 22 Feb 2024 13:10:24 +0100 Subject: [PATCH] dacbert: try enabling fscache for nfs --- hosts/dacbert/default.nix | 2 +- modules/rpi-netboot.nix | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hosts/dacbert/default.nix b/hosts/dacbert/default.nix index b0be343e..32a35783 100644 --- a/hosts/dacbert/default.nix +++ b/hosts/dacbert/default.nix @@ -107,7 +107,7 @@ in fileSystems."/" = { device = "${hostRegistry.nfsroot.ip4}:/var/lib/nfsroot/dacbert"; fsType = "nfs"; - options = [ "nfsvers=3" "proto=tcp" "nolock" "hard" "async" "rw" ]; + options = [ "nfsvers=3" "proto=tcp" "nolock" "hard" "async" "rw" "fsc" ]; }; networking = { diff --git a/modules/rpi-netboot.nix b/modules/rpi-netboot.nix index 6f6481ce..713fa848 100644 --- a/modules/rpi-netboot.nix +++ b/modules/rpi-netboot.nix @@ -76,4 +76,10 @@ echo "dwc_otg.lpm_enable=0 init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}" > $out/cmdline.txt ''; + + # NFS caching + services.cachefilesd = { + enable = true; + cacheDir = "/tmp/fscache"; + }; }