checkpoint
This commit is contained in:
parent
59e8ca812c
commit
6b3389c4b1
13 changed files with 608 additions and 188 deletions
37
lib/options.nix
Normal file
37
lib/options.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkOption types;
|
||||
in {
|
||||
mkUrlOptions = defaults: {
|
||||
host =
|
||||
mkOption {
|
||||
type = types.str;
|
||||
example = "host.tld";
|
||||
description = ''
|
||||
Hostname
|
||||
'';
|
||||
}
|
||||
// (defaults.host or {});
|
||||
|
||||
port =
|
||||
mkOption {
|
||||
type = types.port;
|
||||
default = 1234;
|
||||
example = "1234";
|
||||
description = ''
|
||||
Port
|
||||
'';
|
||||
}
|
||||
// (defaults.port or {});
|
||||
|
||||
protocol =
|
||||
mkOption {
|
||||
type = types.str;
|
||||
default = "https";
|
||||
example = "https";
|
||||
description = ''
|
||||
Which protocol to use when creating a url string
|
||||
'';
|
||||
}
|
||||
// (defaults.protocol or {});
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue