homepage: audiobookshelf init
This commit is contained in:
23
modules/servers/base.nix
Normal file
23
modules/servers/base.nix
Normal 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; }
|
||||
Reference in New Issue
Block a user