summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/default.nix1
-rw-r--r--config/hardware/default.nix7
-rw-r--r--config/storage.nix18
3 files changed, 19 insertions, 7 deletions
diff --git a/config/default.nix b/config/default.nix
index 962b3d1..6827e2d 100644
--- a/config/default.nix
+++ b/config/default.nix
@@ -7,6 +7,7 @@
./hardware
./networking.nix
./nix.nix
+ ./storage.nix
./system.nix
./users.nix
];
diff --git a/config/hardware/default.nix b/config/hardware/default.nix
index 1991008..06555f7 100644
--- a/config/hardware/default.nix
+++ b/config/hardware/default.nix
@@ -44,11 +44,4 @@ in {
after = ["multi-user.target"];
};
};
-
- boot.supportedFilesystems = ["nfs"];
- fileSystems."/data" = {
- device = "ds411.aristote.mesh:/volume2/hephaistos";
- fsType = "nfs";
- options = ["x-systemd.automount" "noauto" "x-systemd.idle-timeout=600"];
- };
}
diff --git a/config/storage.nix b/config/storage.nix
new file mode 100644
index 0000000..a1461b1
--- /dev/null
+++ b/config/storage.nix
@@ -0,0 +1,18 @@
+{...}: {
+ boot.supportedFilesystems = ["nfs"];
+ fileSystems."/data" = {
+ device = "ds411.aristote.mesh:/volume2/hephaistos";
+ fsType = "nfs";
+ options = [
+ # lazy mounting
+ "x-systemd.automount"
+ "noauto"
+ # sleeping
+ "x-systemd.idle-timeout=600"
+ # caching
+ "fsc"
+ ];
+ };
+
+ services.cachefilesd.enable = true;
+}