diff --git a/modules/base-minimal.nix b/modules/base-minimal.nix index 35e1781..df09eb7 100644 --- a/modules/base-minimal.nix +++ b/modules/base-minimal.nix @@ -2,6 +2,7 @@ { imports = [ # Filesystem settings. + ./btrfsFileSystems.nix ./btrfs-mount-options.nix # Shell settings. diff --git a/modules/base.nix b/modules/base.nix index a4bd4d1..f6eeda7 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -4,7 +4,7 @@ ./base-minimal.nix # Filesystem settings. - ./btrfs-scrub.nix + ./btrfsScrub.nix # DNS settings. # diff --git a/modules/btrfsFileSystems.nix b/modules/btrfsFileSystems.nix new file mode 100644 index 0000000..ad4d2f1 --- /dev/null +++ b/modules/btrfsFileSystems.nix @@ -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. + ''; + }; + }; +} \ No newline at end of file diff --git a/modules/btrfs-scrub.nix b/modules/btrfsScrub.nix similarity index 85% rename from modules/btrfs-scrub.nix rename to modules/btrfsScrub.nix index 7b5f124..765f526 100644 --- a/modules/btrfs-scrub.nix +++ b/modules/btrfsScrub.nix @@ -17,16 +17,17 @@ { lib, config, options, pkgs, modulesPath, ... }: with lib; let - cfg = config.yoda.btrfsFileSystems; + cfg = config.yoda.btrfsScrub; in { options = { - yoda.btrfsFileSystems = mkOption { + yoda.btrfsScrub = mkOption { type = types.listOf types.path; - default = ["/"]; + default = config.yoda.btrfsFileSystems; example = ["/" "/mnt/data"]; description = '' List containing each mounted BTRFS filesystem once. + This should usually be left at its default value to regularly scrub all BTRFS file systems. ''; }; };