summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-05-16 00:04:17 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-05-16 00:04:17 +0200
commit2c1768f8d11ec94d47eade5229b8a0a3b7433c91 (patch)
tree09e7e5096f89f7dee17d68d989a25909d080bd79 /hosts
parent97a05b0837e27e8d73d3a16185fb07169de65d7b (diff)
downloadnixos-2c1768f8d11ec94d47eade5229b8a0a3b7433c91.tar
nixos-2c1768f8d11ec94d47eade5229b8a0a3b7433c91.tar.gz
nixos-2c1768f8d11ec94d47eade5229b8a0a3b7433c91.tar.bz2
nixos-2c1768f8d11ec94d47eade5229b8a0a3b7433c91.tar.xz
nixos-2c1768f8d11ec94d47eade5229b8a0a3b7433c91.zip
vidhar: ...
Diffstat (limited to 'hosts')
-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;