summaryrefslogtreecommitdiff
path: root/hosts/vidhar/zfs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/vidhar/zfs.nix')
-rw-r--r--hosts/vidhar/zfs.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/hosts/vidhar/zfs.nix b/hosts/vidhar/zfs.nix
index 3a258961..8e1e4929 100644
--- a/hosts/vidhar/zfs.nix
+++ b/hosts/vidhar/zfs.nix
@@ -96,6 +96,48 @@
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 };
105
106 "/home/mherold/camera/2022-01-16" =
107 { device = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/2022-01-16";
108 fsType = "vfat";
109 options = [ "uid=mherold" "gid=users" "x-systemd.automount" "x-systemd.idle-timeout=120" ];
110 };
111
112 "/home/mherold/camera/2022-05-15" =
113 { device = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/2022-05-15";
114 fsType = "vfat";
115 options = [ "uid=mherold" "gid=users" "x-systemd.automount" "x-systemd.idle-timeout=120" ];
116 };
117 };
118
119 users.users.gkleen.createHome = lib.mkForce false;
120 users.users.mherold.createHome = lib.mkForce false;
121
122 boot.postBootCommands = ''
123 echo "=== STARTING ZPOOL IMPORT ==="
124 ${pkgs.zfs}/bin/zpool import -a -N -d /dev
125 ${pkgs.zfs}/bin/zpool status
126 ${pkgs.zfs}/bin/zfs mount -a
127 echo "=== ZPOOL IMPORT COMPLETE ==="
128 '';
129
130 services.zfssnap.enable = true;
131 services.zfs.trim.enable = false;
132 services.zfs.autoScrub = {
133 enable = true;
134 interval = "Sun *-*-1..7 04:00:00";
135 };
136 services.zfs.zed.settings = {
137 ZED_SYSLOG_SUBCLASS_EXCLUDE = "history_event";
138 };
139 };
140}
99 }; 141 };
100 142
101 users.users.gkleen.createHome = lib.mkForce false; 143 users.users.gkleen.createHome = lib.mkForce false;