From 88892115b5302acab7f7d1ac17fe66de9a5ddf2b Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 5 Jun 2026 13:21:22 +0900 Subject: [PATCH] base: enable autoScrub for all btrfs machine by default --- base/default.nix | 3 +++ hosts/bekkalokk/configuration.nix | 2 -- hosts/kommode/configuration.nix | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/base/default.nix b/base/default.nix index e81d6c1..8a7a5ac 100644 --- a/base/default.nix +++ b/base/default.nix @@ -1,4 +1,5 @@ { + config, pkgs, lib, inputs, @@ -56,6 +57,8 @@ boot.loader.systemd-boot.enable = lib.mkDefault true; boot.loader.efi.canTouchEfiVariables = lib.mkDefault true; + services.btrfs.autoScrub.enable = lib.mkDefault (lib.any ({ fsType, ... }: fsType == "btrfs") (lib.attrValues config.fileSystems)); + time.timeZone = "Europe/Oslo"; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/hosts/bekkalokk/configuration.nix b/hosts/bekkalokk/configuration.nix index 4da44f0..8e92bef 100644 --- a/hosts/bekkalokk/configuration.nix +++ b/hosts/bekkalokk/configuration.nix @@ -25,8 +25,6 @@ address = with values.hosts.bekkalokk; [ (ipv4 + "/25") (ipv6 + "/64") ]; }; - services.btrfs.autoScrub.enable = true; - # Don't change (even during upgrades) unless you know what you are doing. # See https://search.nixos.org/options?show=system.stateVersion system.stateVersion = "25.11"; diff --git a/hosts/kommode/configuration.nix b/hosts/kommode/configuration.nix index a79a5b3..403fa45 100644 --- a/hosts/kommode/configuration.nix +++ b/hosts/kommode/configuration.nix @@ -15,8 +15,6 @@ address = with values.hosts.kommode; [ (ipv4 + "/25") (ipv6 + "/64") ]; }; - services.btrfs.autoScrub.enable = true; - services.qemuGuest.enable = true; # Don't change (even during upgrades) unless you know what you are doing.