separate btrfsFileSystems

This commit is contained in:
Daniel Langbein 2025-01-31 12:52:59 +01:00
parent 24c5c9f86b
commit 5017248af4
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
4 changed files with 23 additions and 4 deletions

View File

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
# Filesystem settings. # Filesystem settings.
./btrfsFileSystems.nix
./btrfs-mount-options.nix ./btrfs-mount-options.nix
# Shell settings. # Shell settings.

View File

@ -4,7 +4,7 @@
./base-minimal.nix ./base-minimal.nix
# Filesystem settings. # Filesystem settings.
./btrfs-scrub.nix ./btrfsScrub.nix
# DNS settings. # DNS settings.
# #

View File

@ -0,0 +1,17 @@
{ lib, config, options, pkgs, modulesPath, ... }:
with lib;
let
cfg = config.yoda.btrfsMounts;
in
{
options = {
yoda.btrfsFileSystems = mkOption {
type = types.listOf types.path;
default = ["/"];
example = ["/" "/mnt/data"];
description = ''
List containing each mounted BTRFS filesystem once.
'';
};
};
}

View File

@ -17,16 +17,17 @@
{ lib, config, options, pkgs, modulesPath, ... }: { lib, config, options, pkgs, modulesPath, ... }:
with lib; with lib;
let let
cfg = config.yoda.btrfsFileSystems; cfg = config.yoda.btrfsScrub;
in in
{ {
options = { options = {
yoda.btrfsFileSystems = mkOption { yoda.btrfsScrub = mkOption {
type = types.listOf types.path; type = types.listOf types.path;
default = ["/"]; default = config.yoda.btrfsFileSystems;
example = ["/" "/mnt/data"]; example = ["/" "/mnt/data"];
description = '' description = ''
List containing each mounted BTRFS filesystem once. List containing each mounted BTRFS filesystem once.
This should usually be left at its default value to regularly scrub all BTRFS file systems.
''; '';
}; };
}; };