checkpoint

This commit is contained in:
Chris Kruining 2026-04-13 15:58:41 +02:00
parent 59e8ca812c
commit 6b3389c4b1
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
13 changed files with 608 additions and 188 deletions

37
lib/options.nix Normal file
View 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 {});
};
}