1
0
mirror of https://codeberg.org/privacy1st/nix-git synced 2025-03-12 12:40:15 +01:00

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

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

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

@ -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.
'';
};
};
}

@ -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.
''; '';
}; };
}; };