Extend the vendor configuration
This commit is contained in:
parent
562bcc0574
commit
ebb42250a7
|
@ -78,7 +78,7 @@ let
|
|||
});
|
||||
|
||||
mkWebdavProvider = (
|
||||
{ displayName, vendor, ... }: (
|
||||
{ displayName, vendor ? null, ... }: (
|
||||
{ config, ... }: {
|
||||
imports = [
|
||||
mkProvider
|
||||
|
@ -86,7 +86,15 @@ let
|
|||
|
||||
options = {
|
||||
vendor = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
type = lib.types.nullOr (lib.types.enum [
|
||||
"fastmail"
|
||||
nextcloudVendor
|
||||
owncloudVendor
|
||||
"sharepoint"
|
||||
"sharepoint-ntlm"
|
||||
"rclone"
|
||||
"other"
|
||||
]);
|
||||
description = "The vendor of the WebDAV share.";
|
||||
default = vendor;
|
||||
};
|
||||
|
@ -118,10 +126,8 @@ let
|
|||
|
||||
config = {
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
inherit vendor;
|
||||
url = config.url;
|
||||
}
|
||||
{ url = config.url; }
|
||||
(mkIfNotNull config.vendor { inherit (config) vendor; })
|
||||
(mkIfNotNull config.username { user = config.username; })
|
||||
(mkIfNotNull config.obscuredPassword { pass = config.obscuredPassword; })
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue