lib.types: turn _create, _mount and _config into values

This commit is contained in:
lassulus 2023-07-01 19:02:01 +02:00 committed by mergify[bot]
parent 8002e7cb89
commit ab9b880db2
17 changed files with 194 additions and 146 deletions

View file

@ -35,11 +35,11 @@
};
_create = diskoLib.mkCreateOption {
inherit config options;
default = _: "";
default = "";
};
_mount = diskoLib.mkMountOption {
inherit config options;
default = _: lib.optionalAttrs (config.mountpoint != null) {
default = lib.optionalAttrs (config.mountpoint != null) {
fs.${config.mountpoint} = ''
if ! findmnt ${config.fsType} "${rootMountPoint}${config.mountpoint}" > /dev/null 2>&1; then
mount -t ${config.fsType} ${config.device} "${rootMountPoint}${config.mountpoint}" \