Skip to content

Commit

Permalink
Merge pull request #1 from r-vdp/main
Browse files Browse the repository at this point in the history
Make it easier to add additional mount options
  • Loading branch information
WilliButz authored Sep 4, 2024
2 parents 785bf76 + f58a36d commit 9f6f0e0
Showing 1 changed file with 18 additions and 5 deletions.
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

0 comments on commit 9f6f0e0

Please sign in to comment.