reverted server factory
This commit is contained in:
@@ -55,55 +55,6 @@ in
|
||||
|> builtins.attrNames
|
||||
|> builtins.filter (file: builtins.match ".*\\.nix" file != null && filterFn file)
|
||||
|> map (file: dir + "/${file}");
|
||||
mkServerOptions = name: subdomain: port: lib: {
|
||||
enable = lib.mkEnableOption "this server service";
|
||||
enableCron = lib.mkEnableOption "enable cronjob";
|
||||
enableProxy = lib.mkEnableOption "enable reverse proxy";
|
||||
port = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = port;
|
||||
};
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = name;
|
||||
};
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "servidos.lat";
|
||||
};
|
||||
host = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${subdomain}.servidos.lat";
|
||||
};
|
||||
hostName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "miniserver";
|
||||
};
|
||||
url = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "https://${subdomain}.servidos.lat";
|
||||
};
|
||||
ip = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "127.0.0.1";
|
||||
};
|
||||
local = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "http://127.0.0.1:${toString port}";
|
||||
};
|
||||
isLocal = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
enableSocket = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
certPath = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
proxy = locations: {
|
||||
inherit locations;
|
||||
forceSSL = true;
|
||||
|
||||
Reference in New Issue
Block a user