fix(bw): websocket port deprecated

This commit is contained in:
arcnmx 2024-07-15 10:25:07 -07:00
parent 7fe6d48ff0
commit 4ee6ff86e3
4 changed files with 0 additions and 51 deletions

View file

@ -17,10 +17,6 @@ in {
type = port;
default = 8222;
};
websocketPort = mkOption {
type = nullOr port;
default = null;
};
databaseUrlPath = mkOption {
type = nullOr str;
default = null;
@ -41,9 +37,6 @@ in {
ROCKET_ENV = mkOptionDefault "production";
ROCKET_ADDRESS = mkOptionDefault "::1";
ROCKET_PORT = mkOptionDefault cfg.port;
WEBSOCKET_ENABLED = mkOptionDefault (cfg.websocketPort != null);
WEBSOCKET_ADDRESS = mkOptionDefault "::1";
WEBSOCKET_PORT = mkIf (cfg.websocketPort != null) cfg.websocketPort;
};
};
config.systemd.services.vaultwarden = let

View file

@ -16,14 +16,6 @@ in {
assertion = config.ports.default.port == nixosConfig.services.vaultwarden.port;
message = "port mismatch";
})
(nixosConfig: {
assertion = nixosConfig.services.vaultwarden.websocketPort == null || config.ports.websocket.port == nixosConfig.services.vaultwarden.websocketPort;
message = "websocketPort mismatch";
})
(nixosConfig: {
assertion = config.ports.websocket.enable == (nixosConfig.services.vaultwarden.websocketPort != null);
message = "websocketPort enable mismatch";
})
];
};
ports = {
@ -32,18 +24,6 @@ in {
protocol = "http";
status.enable = mkAlmostOptionDefault true;
};
websocket = {
port = mkAlmostOptionDefault 8223;
protocol = "http";
displayName = mkAlmostOptionDefault "WebSocket";
status = {
enable = mkAlmostOptionDefault true;
gatus.http.websocket = {
enable = mkAlmostOptionDefault true;
status = mkAlmostOptionDefault 401;
};
};
};
};
};
}