summaryrefslogtreecommitdiff
path: root/archetypes/profiles/btrfs/default.nix
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2026-04-11 18:33:20 -0500
committerTim Keller <tjk@tjkeller.xyz>2026-04-11 18:33:20 -0500
commit9a40ac45f0e572a41f2f8f3d2f18c50338c9ddb2 (patch)
tree5eca399aef60a647708307cdc726aed22726fe45 /archetypes/profiles/btrfs/default.nix
parentca935461bc128bbeb82e4b3f5504a480c269dc0a (diff)
downloadnixos-9a40ac45f0e572a41f2f8f3d2f18c50338c9ddb2.tar.xz
nixos-9a40ac45f0e572a41f2f8f3d2f18c50338c9ddb2.zip
btrfs profile with autoscrubbing and move docker.storageDriver to the btrfs/zfs profiles
Diffstat (limited to 'archetypes/profiles/btrfs/default.nix')
-rw-r--r--archetypes/profiles/btrfs/default.nix17
1 files changed, 17 insertions, 0 deletions
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) ];
+}