From 9a40ac45f0e572a41f2f8f3d2f18c50338c9ddb2 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sat, 11 Apr 2026 18:33:20 -0500 Subject: btrfs profile with autoscrubbing and move docker.storageDriver to the btrfs/zfs profiles --- archetypes/profiles/btrfs/default.nix | 17 +++++++++++++++++ archetypes/profiles/zfs/default.nix | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 archetypes/profiles/btrfs/default.nix (limited to 'archetypes/profiles') diff --git a/archetypes/profiles/btrfs/default.nix b/archetypes/profiles/btrfs/default.nix new file mode 100644 index 0000000..88fad38 --- /dev/null +++ b/archetypes/profiles/btrfs/default.nix @@ -0,0 +1,17 @@ +{ lib, pkgs, ... }: let + mkBtrfs = lib.mkOverride 820; + + # https://wiki.nixos.org/wiki/Btrfs + nixosConfig = { + services.btrfs = { + autoScrub.enable = mkBtrfs true; + }; + + # Make docker work with btrfs + virtualisation.docker.storageDriver = mkBtrfs "btrfs"; + }; + + homeConfig = {}; +in { + imports = [ (lib._mkProfileArchetype "btrfs" nixosConfig homeConfig) ]; +} diff --git a/archetypes/profiles/zfs/default.nix b/archetypes/profiles/zfs/default.nix index 5fe63fe..a3ca2e1 100644 --- a/archetypes/profiles/zfs/default.nix +++ b/archetypes/profiles/zfs/default.nix @@ -13,10 +13,12 @@ autoSnapshot.enable = mkZfs true; autoScrub.enable = mkZfs true; }; + + # Make docker work with zfs + virtualisation.docker.storageDriver = mkZfs "zfs"; }; homeConfig = {}; in { imports = [ (lib._mkProfileArchetype "zfs" nixosConfig homeConfig) ]; } - -- cgit v1.2.3