add btrfs module

This commit is contained in:
Kopatz
2024-05-13 19:28:05 +02:00
parent fadb8a8dba
commit eb1009d0d8
3 changed files with 22 additions and 5 deletions

15
modules/misc/btrfs.nix Normal file
View File

@@ -0,0 +1,15 @@
{config, lib, ...}:
with lib;
let
cfg = config.custom.misc.btrfs;
in
{
options.custom.misc.btrfs = {
enable = mkEnableOption "Enables btrfs scrubbing";
};
config = mkIf cfg.enable {
services.btrfs.autoScrub.enable = true;
};
}

View File

@@ -2,12 +2,13 @@
{
imports = [
./backup.nix
./wireshark.nix
./virt-manager.nix
./nftables.nix
./btrfs.nix
./cli-tools.nix
./tmpfs.nix
./static-ip.nix
./docker.nix
./nftables.nix
./static-ip.nix
./tmpfs.nix
./virt-manager.nix
./wireshark.nix
];
}

View File

@@ -34,6 +34,7 @@
ssd.enable = true;
};
misc = {
btrfs.enable = true;
backup = let
kavita = "/data/kavita";
syncthing = [ "/synced/default/" "/synced/work_drive/" ];