From 2c1768f8d11ec94d47eade5229b8a0a3b7433c91 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 16 May 2022 00:04:17 +0200 Subject: vidhar: ... --- hosts/vidhar/zfs.nix | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'hosts') 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 @@ # fsType = "zfs"; # options = [ "zfsutil" ]; # }; + + "/home/mherold/camera/2020-09-13" = + { device = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/2020-09-13"; + fsType = "vfat"; + options = [ "uid=mherold" "gid=users" "x-systemd.automount" "x-systemd.idle-timeout=120" ]; + }; + + "/home/mherold/camera/2022-01-16" = + { device = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/2022-01-16"; + fsType = "vfat"; + options = [ "uid=mherold" "gid=users" "x-systemd.automount" "x-systemd.idle-timeout=120" ]; + }; + + "/home/mherold/camera/2022-05-15" = + { device = "/dev/zvol/hdd-raid6/safe/home/mherold/camera/2022-05-15"; + fsType = "vfat"; + options = [ "uid=mherold" "gid=users" "x-systemd.automount" "x-systemd.idle-timeout=120" ]; + }; + }; + + users.users.gkleen.createHome = lib.mkForce false; + users.users.mherold.createHome = lib.mkForce false; + + boot.postBootCommands = '' + echo "=== STARTING ZPOOL IMPORT ===" + ${pkgs.zfs}/bin/zpool import -a -N -d /dev + ${pkgs.zfs}/bin/zpool status + ${pkgs.zfs}/bin/zfs mount -a + echo "=== ZPOOL IMPORT COMPLETE ===" + ''; + + services.zfssnap.enable = true; + services.zfs.trim.enable = false; + services.zfs.autoScrub = { + enable = true; + interval = "Sun *-*-1..7 04:00:00"; + }; + services.zfs.zed.settings = { + ZED_SYSLOG_SUBCLASS_EXCLUDE = "history_event"; + }; + }; +} }; users.users.gkleen.createHome = lib.mkForce false; -- cgit v1.2.3