summaryrefslogtreecommitdiff
path: root/hosts/vidhar/zfs.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-12-29 19:35:55 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-12-29 19:35:55 +0100
commitb01273e1dda369f1f6f8ea6d4978d2254cab480c (patch)
treeb909c8851f31f087a841e3cd0dbe8d707f9fd645 /hosts/vidhar/zfs.nix
parent031b5bd0989d9664f41602dc6356b82ccc931090 (diff)
downloadnixos-b01273e1dda369f1f6f8ea6d4978d2254cab480c.tar
nixos-b01273e1dda369f1f6f8ea6d4978d2254cab480c.tar.gz
nixos-b01273e1dda369f1f6f8ea6d4978d2254cab480c.tar.bz2
nixos-b01273e1dda369f1f6f8ea6d4978d2254cab480c.tar.xz
nixos-b01273e1dda369f1f6f8ea6d4978d2254cab480c.zip
...
Diffstat (limited to 'hosts/vidhar/zfs.nix')
-rw-r--r--hosts/vidhar/zfs.nix46
1 files changed, 18 insertions, 28 deletions
diff --git a/hosts/vidhar/zfs.nix b/hosts/vidhar/zfs.nix
index 7689776b..afb155b2 100644
--- a/hosts/vidhar/zfs.nix
+++ b/hosts/vidhar/zfs.nix
@@ -96,36 +96,26 @@
96 # fsType = "zfs"; 96 # fsType = "zfs";
97 # options = [ "zfsutil" ]; 97 # options = [ "zfsutil" ];
98 # }; 98 # };
99
100 "/home/mherold/camera/2020-09-13" =
101 { device = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/2020-09-13";
102 fsType = "vfat";
103 options = [ "uid=mherold" "gid=users" "x-systemd.automount" "x-systemd.idle-timeout=120" ];
104 noCheck = true;
105 };
106
107 "/home/mherold/camera/2022-01-16" =
108 { device = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/2022-01-16";
109 fsType = "vfat";
110 options = [ "uid=mherold" "gid=users" "x-systemd.automount" "x-systemd.idle-timeout=120" ];
111 noCheck = true;
112 };
113
114 "/home/mherold/camera/2022-05-15" =
115 { device = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/2022-05-15";
116 fsType = "vfat";
117 options = [ "uid=mherold" "gid=users" "x-systemd.automount" "x-systemd.idle-timeout=120" ];
118 noCheck = true;
119 };
120
121 "/home/mherold/camera/2022-12-29" =
122 { device = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/2022-12-29";
123 fsType = "vfat";
124 options = [ "uid=mherold" "gid=users" "x-systemd.automount" "x-systemd.idle-timeout=120" ];
125 noCheck = true;
126 };
127 }; 99 };
128 100
101 systemd.mounts = map (date: {
102 where = "/home/mherold/camera/${date}";
103 what = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/${date}";
104 type = "vfat";
105 options = lib.concatStringsSep ","
106 [ "ro"
107 "uid=mherold" "gid=users" "fmask=0177" "dmask=0077"
108 "nofail"
109 ];
110 }) ["2020-09-13" "2022-01-16" "2022-05-15" "2022-12-29"];
111 systemd.automounts = map (date: {
112 wantedBy = [ "multi-user.target" ];
113
114 where = "/home/mherold/camera/${date}";
115
116 automountConfig.TimeoutIdleSec = "2m";
117 }) ["2020-09-13" "2022-01-16" "2022-05-15" "2022-12-29"];
118
129 users.users.gkleen.createHome = lib.mkForce false; 119 users.users.gkleen.createHome = lib.mkForce false;
130 users.users.mherold.createHome = lib.mkForce false; 120 users.users.mherold.createHome = lib.mkForce false;
131 121