Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make it easier to add additional mount options #1

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,12 @@ let
};
mountOptions = lib.mkOption {
type = with lib.types; listOf (coercedTo str (n: { name = n; }) mountOption);
default = [
"bind"
"X-fstrim.notrim" # see fstrim(8)
];
description = ''
Specify a list of mount options that should be used for this directory.
These options are only used when {option}`how` is set to `bindmount`.
By default, `bind` and `X-fstrim.notrim` are added,
use `mkForce` to override these if needed.
See also {manpage}`fstrim(8)`.
'';
};
createLinkTarget = lib.mkOption {
Expand Down Expand Up @@ -143,6 +142,13 @@ let
'';
};
};

config = {
mountOptions = [
"bind"
"X-fstrim.notrim" # see fstrim(8)
];
};
};

filePath =
Expand Down Expand Up @@ -239,10 +245,11 @@ let
};
mountOptions = lib.mkOption {
type = with lib.types; listOf (coercedTo str (o: { name = o; }) mountOption);
default = [ "bind" ];
description = ''
Specify a list of mount options that should be used for this file.
These options are only used when {option}`how` is set to `bindmount`.
By default, `bind` is added,
use `mkForce` to override this if needed.
'';
};
createLinkTarget = lib.mkOption {
Expand Down Expand Up @@ -275,6 +282,12 @@ let
'';
};
};

config = {
mountOptions = [
"bind"
];
};
};

userModule =
Expand Down