cachefilesd added for nfs caching
This commit is contained in:
+8
-4
@@ -1,12 +1,16 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
|
# Add NFS support to the initramfs so it can be mounted at boot.
|
||||||
# Add ZFS and NFS support to the initramfs so it can be mounted at boot.
|
|
||||||
boot.supportedFilesystems = [ "nfs" ];
|
boot.supportedFilesystems = [ "nfs" ];
|
||||||
|
|
||||||
|
services.cachefilesd = {
|
||||||
|
enable = true;
|
||||||
|
cacheDir = "/data/cache";
|
||||||
|
};
|
||||||
|
|
||||||
systemd.mounts = [{
|
systemd.mounts = [{
|
||||||
type = "nfs";
|
type = "nfs";
|
||||||
mountConfig = {
|
mountConfig = {
|
||||||
Options = "noatime";
|
Options = "noatime,fsc";
|
||||||
};
|
};
|
||||||
what = "${config.vars.nfs_server}:${config.vars.nfs_volume}";
|
what = "${config.vars.nfs_server}:${config.vars.nfs_volume}";
|
||||||
where = config.vars.nfs_mount;
|
where = config.vars.nfs_mount;
|
||||||
@@ -20,4 +24,4 @@
|
|||||||
where = config.vars.nfs_mount;
|
where = config.vars.nfs_mount;
|
||||||
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user