btrfs.autoScrub: enable

This commit is contained in:
2024-11-08 09:36:33 +00:00
parent b897640f7f
commit a34ab22fd7
3 changed files with 20 additions and 7 deletions

View File

@@ -445,13 +445,6 @@ in
bridge-utils.sandbox.net = "all";
btrfs-progs.sandbox.autodetectCliPaths = "existing"; # e.g. `btrfs filesystem df /my/fs`
btrfs-progs.sandbox.extraPaths = [
"/dev/btrfs-control"
];
btrfs-progs.sandbox.tryKeepUsers = true;
btrfs-progs.sandbox.capabilities = [ "sys_admin" ]; # for `btrfs scrub`
"cacert.unbundled".sandbox.enable = false; #< data only
cargo.persist.byStore.plaintext = [ ".cargo" ];

View File

@@ -0,0 +1,19 @@
{ config, lib, ... }:
let
cfg = config.sane.programs.btrfs-progs;
in
{
sane.programs.btrfs-progs = {
sandbox.autodetectCliPaths = "existing"; # e.g. `btrfs filesystem df /my/fs`
sandbox.extraPaths = [
"/dev/btrfs-control"
];
sandbox.tryKeepUsers = true;
sandbox.capabilities = [ "sys_admin" ]; # for `btrfs scrub`
};
# TODO: service sandboxing
services.btrfs.autoScrub.enable = lib.mkIf cfg.enabled true;
services.btrfs.autoScrub.interval = "weekly";
}

View File

@@ -17,6 +17,7 @@
./bonsai.nix
./brave.nix
./brightnessctl.nix
./btrfs-progs.nix
./bubblewrap.nix
./bunpen.nix
./callaudiod.nix