nixos/nextcloud-notify_push: use lib.genAttrs

This commit is contained in:
ajs124 2023-02-21 13:26:33 +01:00
parent 6c24a28ea6
commit bdb0566f8b

View file

@ -26,21 +26,19 @@ in
description = lib.mdDoc "Log level";
};
} // (
lib.listToAttrs (
map (
opt: lib.nameValuePair opt (options.services.nextcloud.config.${opt} // {
default = config.services.nextcloud.config.${opt};
defaultText = lib.mdDoc "config.services.nextcloud.config.${opt}";
})
) [
"dbtype"
"dbname"
"dbuser"
"dbpassFile"
"dbhost"
"dbport"
"dbtableprefix"
]
lib.genAttrs [
"dbtype"
"dbname"
"dbuser"
"dbpassFile"
"dbhost"
"dbport"
"dbtableprefix"
] (
opt: options.services.nextcloud.config.${opt} // {
default = config.services.nextcloud.config.${opt};
defaultText = "config.services.nextcloud.config.${opt}";
}
)
);