The other part of dotfiles
This commit is contained in:
parent
2fbfed0e7a
commit
9f1ba4a64b
25 changed files with 1089 additions and 0 deletions
31
modules/btrfs-autoscrub.nix
Normal file
31
modules/btrfs-autoscrub.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.btrfsAutoscrub;
|
||||
in
|
||||
{
|
||||
options.btrfsAutoscrub = {
|
||||
enable = lib.mkEnableOption "Enable BTRFS Auto Scrub module";
|
||||
|
||||
interval = lib.mkOption {
|
||||
default = "weekly";
|
||||
type = config.services.btrfs.autoScrub.interval.type;
|
||||
description = config.services.btrfs.autoScrub.interval.description;
|
||||
};
|
||||
|
||||
fileSystems = lib.mkOption {
|
||||
default = [ ];
|
||||
type = config.services.btrfs.autoScrub.fileSystems.type;
|
||||
description = config.services.btrfs.autoScrub.fileSystems.description;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = cfg.interval;
|
||||
fileSystems = cfg.interval;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue