diff options
Diffstat (limited to 'archetypes/profiles/zfs/default.nix')
| -rw-r--r-- | archetypes/profiles/zfs/default.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/archetypes/profiles/zfs/default.nix b/archetypes/profiles/zfs/default.nix new file mode 100644 index 0000000..5fe63fe --- /dev/null +++ b/archetypes/profiles/zfs/default.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, ... }: let + mkZfs = lib.mkOverride 810; + + # https://wiki.nixos.org/wiki/ZFS + nixosConfig = { + boot._loader = { + grub.zfsSupport = mkZfs true; + mode = mkZfs "efi"; + }; + + services.zfs = { + trim.enable = mkZfs true; + autoSnapshot.enable = mkZfs true; + autoScrub.enable = mkZfs true; + }; + }; + + homeConfig = {}; +in { + imports = [ (lib._mkProfileArchetype "zfs" nixosConfig homeConfig) ]; +} + |
