acpid: inc/dec brightness by 1 instead of 10
[julm/julm-nix.git] / nixos / profiles / zfs.nix
index 62aeb7b9609ee4fd1335a671526fefef96b280d6..dff137f2fe193b6c9274f669e62b9af80e007747 100644 (file)
@@ -8,10 +8,15 @@
   boot.supportedFilesystems = [ "zfs" ];
   boot.initrd.supportedFilesystems = [ "zfs" ];
 
+  boot.kernelParams = [
+    # Disabled because the zfs kernel module is not signed
+    "module.sig_enforce=0"
+  ];
+
   # Using ZFS together with hibernation (suspend to disk)
   # may cause filesystem corruption.
   # See https://github.com/openzfs/zfs/issues/260
-  boot.kernelParams = [ "nohibernate" ];
+  boot.zfs.allowHibernation = false;
 
   # Stable enough, clearer, and faster than the default /dev/disk/by-id
   boot.zfs.devNodes = "/dev/disk/by-partlabel";
@@ -23,7 +28,7 @@
   boot.zfs.forceImportRoot = true;
   boot.zfs.requestEncryptionCredentials = lib.mkDefault [ "${hostName}/root" ];
 
-  boot.zfs.enableUnstable = false;
+  #boot.zfs.package = pkgs.zfs_unstable;
 
   # Enables periodic scrubbing of ZFS pools.
   services.zfs.autoScrub.enable = true;
@@ -38,7 +43,7 @@
   # Hide ZFS mountpoints from gio, hence nautilus or caja
   systemd.services.zfs-mount.postStart = ''
     /run/wrappers/bin/mount -t zfs | cut -f 1 -d ' ' |
-    xargs -n 1 -r -t /run/wrappers/bin/mount -o remount,x-gvfs-hide
+    xargs -n 1 -r -t /run/wrappers/bin/mount -o remount,x-gvfs-hide || true
   '';
 
   environment.systemPackages = [
@@ -66,6 +71,7 @@
       ExecStart = pkgs.writeShellScript "zfs-import" ''
         pool="$1"
         set -eux
+        zpool status "$pool" ||
         zpool import -lFd /dev/disk/by-id/ -o cachefile=none "$pool" ||
         zpool reopen "$pool" ||
         zpool import -lfd /dev/disk/by-id/ -o cachefile=none "$pool" ||