From cd6faba18357626d009de61d1942d8cb1306b8b1 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Sat, 6 Apr 2024 19:59:23 +0200 Subject: [PATCH] put btrfs scrub into options and enable it on me server --- hosts/chmura/profile.nix | 1 + hosts/del/configuration.nix | 7 ------- hosts/del/profile.nix | 1 + hosts/niks/configuration.nix | 7 ------- hosts/niks/profile.nix | 1 + options/common/btrfs-scrub.nix | 8 ++++++++ 6 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 options/common/btrfs-scrub.nix diff --git a/hosts/chmura/profile.nix b/hosts/chmura/profile.nix index a3e03e2ab..d85961c0a 100644 --- a/hosts/chmura/profile.nix +++ b/hosts/chmura/profile.nix @@ -1,5 +1,6 @@ _: { imports = [ + ../../options/common/btrfs-scrub.nix ../../options/common/xz.nix ]; } diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index acd792177..4fa415104 100644 --- a/hosts/del/configuration.nix +++ b/hosts/del/configuration.nix @@ -94,13 +94,6 @@ }; }; - services.btrfs = { - autoScrub = { - enable = true; - interval = "weekly"; - }; - }; - services.journald = { extraConfig = '' SystemMaxUse=100M diff --git a/hosts/del/profile.nix b/hosts/del/profile.nix index 2938f7968..fc0aa4fa8 100644 --- a/hosts/del/profile.nix +++ b/hosts/del/profile.nix @@ -1,6 +1,7 @@ _: { imports = [ ../../options/boot/systemd-boot.nix + ../../options/common/btrfs-scrub.nix ../../options/common/docs.nix ../../options/common/networking.nix ../../options/common/nix.nix diff --git a/hosts/niks/configuration.nix b/hosts/niks/configuration.nix index f2a3cd7a9..0748239fc 100644 --- a/hosts/niks/configuration.nix +++ b/hosts/niks/configuration.nix @@ -65,13 +65,6 @@ ratbagd.enable = true; }; - services.btrfs = { - autoScrub = { - enable = true; - interval = "weekly"; - }; - }; - services.journald = { extraConfig = '' SystemMaxUse=100M diff --git a/hosts/niks/profile.nix b/hosts/niks/profile.nix index a4cb84a0e..f4cd21ad0 100644 --- a/hosts/niks/profile.nix +++ b/hosts/niks/profile.nix @@ -1,6 +1,7 @@ _: { imports = [ ../../options/boot/systemd-boot.nix + ../../options/common/btrfs-scrub.nix ../../options/common/cpu/amd.nix ../../options/common/docs.nix ../../options/common/gpu/amd.nix diff --git a/options/common/btrfs-scrub.nix b/options/common/btrfs-scrub.nix new file mode 100644 index 000000000..074c8da65 --- /dev/null +++ b/options/common/btrfs-scrub.nix @@ -0,0 +1,8 @@ +_: { + services.btrfs = { + autoScrub = { + enable = true; + interval = "weekly"; + }; + }; +}