From 3f20c20af788e8a8e23ebdd602c4242730d3eb4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <cynerd@email.cz>
Date: Mon, 19 Feb 2024 13:58:00 +0100
Subject: nixos: enable autoScrub for BTRFS

---
 nixos/machine/adm-omnia2.nix | 5 +++++
 nixos/machine/binky.nix      | 4 ++++
 nixos/machine/errol.nix      | 4 ++++
 nixos/machine/ridcully.nix   | 4 ++++
 nixos/machine/spt-mox.nix    | 5 +++++
 nixos/machine/spt-mox2.nix   | 5 +++++
 6 files changed, 27 insertions(+)

(limited to 'nixos/machine')

diff --git a/nixos/machine/adm-omnia2.nix b/nixos/machine/adm-omnia2.nix
index 31aecab..2573372 100644
--- a/nixos/machine/adm-omnia2.nix
+++ b/nixos/machine/adm-omnia2.nix
@@ -19,6 +19,11 @@ with lib; {
       };
     };
 
+    services.btrfs.autoScrub = {
+      enable = true;
+      fileSystems = ["/"];
+    };
+
     networking = {
       useNetworkd = true;
       useDHCP = false;
diff --git a/nixos/machine/binky.nix b/nixos/machine/binky.nix
index 8c6ffc5..a210a4b 100644
--- a/nixos/machine/binky.nix
+++ b/nixos/machine/binky.nix
@@ -51,6 +51,10 @@ in {
         fsType = "vfat";
       };
     };
+    services.btrfs.autoScrub = {
+      enable = true;
+      fileSystems = ["/"];
+    };
 
     services.syncthing = {
       enable = true;
diff --git a/nixos/machine/errol.nix b/nixos/machine/errol.nix
index f0d0aa2..16223d0 100644
--- a/nixos/machine/errol.nix
+++ b/nixos/machine/errol.nix
@@ -49,6 +49,10 @@ in {
         options = ["compress=lzo" "subvol=@home"];
       };
     };
+    services.btrfs.autoScrub = {
+      enable = true;
+      fileSystems = ["/" "/home2"];
+    };
 
     services.syncthing = {
       enable = true;
diff --git a/nixos/machine/ridcully.nix b/nixos/machine/ridcully.nix
index 8d45959..3afebdd 100644
--- a/nixos/machine/ridcully.nix
+++ b/nixos/machine/ridcully.nix
@@ -48,6 +48,10 @@ in {
         options = ["compress=lzo" "subvol=@home"];
       };
     };
+    services.btrfs.autoScrub = {
+      enable = true;
+      fileSystems = ["/" "/home2"];
+    };
 
     #networking.vlans."enp6s0.adm" = {
     #id = 2;
diff --git a/nixos/machine/spt-mox.nix b/nixos/machine/spt-mox.nix
index 452b187..b223e86 100644
--- a/nixos/machine/spt-mox.nix
+++ b/nixos/machine/spt-mox.nix
@@ -24,6 +24,11 @@ with lib; {
       };
     };
 
+    services.btrfs.autoScrub = {
+      enable = true;
+      fileSystems = ["/"];
+    };
+
     networking = {
       useNetworkd = true;
       useDHCP = false;
diff --git a/nixos/machine/spt-mox2.nix b/nixos/machine/spt-mox2.nix
index cf94798..7eb5c59 100644
--- a/nixos/machine/spt-mox2.nix
+++ b/nixos/machine/spt-mox2.nix
@@ -22,6 +22,11 @@ with lib; {
       };
     };
 
+    services.btrfs.autoScrub = {
+      enable = true;
+      fileSystems = ["/"];
+    };
+
     networking = {
       useNetworkd = true;
       useDHCP = false;
-- 
cgit v1.2.3