summaryrefslogtreecommitdiff
path: root/modules/root/filesystems.nix
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2024-10-31 19:58:51 -0500
committerTim Keller <tjkeller.xyz>2024-10-31 19:58:51 -0500
commitd5644331a09b8eb0645b40003cb8a1281bc165d9 (patch)
tree087a0dcdcce19c182b077e85e62671921b8e8b9b /modules/root/filesystems.nix
parent5cd716012f0a75a9f740b90d4afe7a205dee1b3b (diff)
downloadnixos-d5644331a09b8eb0645b40003cb8a1281bc165d9.tar.xz
nixos-d5644331a09b8eb0645b40003cb8a1281bc165d9.zip
filesystems and other
Diffstat (limited to 'modules/root/filesystems.nix')
-rw-r--r--modules/root/filesystems.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/root/filesystems.nix b/modules/root/filesystems.nix
new file mode 100644
index 0000000..1784feb
--- /dev/null
+++ b/modules/root/filesystems.nix
@@ -0,0 +1,23 @@
+{ lib, config, ... } :
+let
+ mkNetworkFileSystem = device : {
+ device = "${device}";
+ fsType = "nfs";
+ options = [ "noauto" "defaults" ];
+ };
+in {
+ options = {
+ fs.networkFS.enable = lib.mkEnableOption "enable network shares";
+ };
+ config = {
+ fileSystems = lib.mkIf config.fs.networkFS.enable {
+ "/media/Storage/Media" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Media";
+ "/media/Storage/Backups" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups";
+ "/media/Storage/Tapes" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups/Tapes";
+ "/media/Family Photos" = mkNetworkFileSystem "truenas-home:/mnt/Media/Photos";
+ "/media/chexx/chexx" = mkNetworkFileSystem "truenas-office:/mnt/Storage/chexx";
+ "/media/chexx/tkdocs" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Users/Tim-Keller";
+ "/media/chexx/scans" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Scans";
+ };
+ };
+}