treewide: dedup btrfs auto scrub configuration
This commit is contained in:
parent
fd97c33c56
commit
bf02e988b3
|
@ -18,6 +18,7 @@ let
|
|||
programs.tools.common
|
||||
security.polkit
|
||||
security.sudo
|
||||
services.btrfs-auto-scrub
|
||||
services.dbus
|
||||
services.journald
|
||||
services.openssh
|
||||
|
|
|
@ -3,10 +3,4 @@
|
|||
enable = true;
|
||||
root = "/persist";
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/persist" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,10 +3,4 @@
|
|||
enable = true;
|
||||
root = "/persist";
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/persist" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
environment.globalPersistence = {
|
||||
enable = true;
|
||||
root = "/persist";
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/persist" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,10 +3,4 @@
|
|||
enable = true;
|
||||
root = "/persist";
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/persist" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,10 +3,4 @@
|
|||
enable = true;
|
||||
root = "/persist";
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/persist" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,10 +3,4 @@
|
|||
enable = true;
|
||||
root = "/persist";
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/persist" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,10 +3,4 @@
|
|||
enable = true;
|
||||
root = "/persist";
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/persist" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,10 +3,4 @@
|
|||
enable = true;
|
||||
root = "/persist";
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/persist" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,10 +3,4 @@
|
|||
enable = true;
|
||||
root = "/persist";
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/persist" ];
|
||||
};
|
||||
}
|
||||
|
|
14
nixos/profiles/services/btrfs-auto-scrub/default.nix
Normal file
14
nixos/profiles/services/btrfs-auto-scrub/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
btrfsDevices = lib.unique (
|
||||
lib.mapAttrsToList (_name: value: value.device) (
|
||||
lib.filterAttrs (_name: value: value.fsType == "btrfs") config.fileSystems
|
||||
)
|
||||
);
|
||||
in
|
||||
{
|
||||
services.btrfs.autoScrub = {
|
||||
enable = btrfsDevices != [ ];
|
||||
fileSystems = btrfsDevices;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue