homepage: audiobookshelf init

This commit is contained in:
2024-07-05 20:46:50 -06:00
parent 96e5a4b8ca
commit 8d70d160cf
5 changed files with 72 additions and 11 deletions

23
modules/servers/base.nix Normal file
View File

@@ -0,0 +1,23 @@
{ lib, config, ... }:
let
mkServerOptions = name: subdomain: port: {
enable = lib.mkEnableOption "enable";
port = lib.mkOption {
type = lib.types.int;
default = port;
};
host = lib.mkOption {
type = lib.types.str;
default = "${subdomain}.${config.my.domain}";
};
url = lib.mkOption {
type = lib.types.str;
default = "https://${config.my.servers.${name}.host}";
};
local = lib.mkOption {
type = lib.types.str;
default = "http://${config.my.localhost}:${toString port}";
};
};
in { inherit mkServerOptions; }