fix vaultwarden domain

this makes vaultwarden send downloads work correctly
This commit is contained in:
xunuwu 2025-05-21 15:20:26 +02:00
parent 02385086ff
commit b10a2331c4
3 changed files with 10 additions and 3 deletions

View file

@ -15,10 +15,12 @@
systems = ["x86_64-linux"];
flake.nixosConfigurations = mylib.loadConfigurations ./sys/machines (hostname: {
inherit inputs self systemProfiles homeProfiles homeSuites vars;
inherit inputs self systemProfiles homeProfiles homeSuites vars mylib;
hostVars = ./vars/${hostname};
});
flake._mylib = mylib;
perSystem = {pkgs, ...}: {
imports = [
./shells

View file

@ -7,4 +7,5 @@ in {
modules = [(dir + /${name})];
specialArgs = specialArgsFromHost name;
})) (b.readDir dir);
stripPort = url: builtins.match "(.*):[0-9]*" url |> builtins.head;
}

View file

@ -1,4 +1,8 @@
{config, ...}: {
{
config,
mylib,
...
}: {
systemd.services.vaultwarden = {
serviceConfig.EnvironmentFile = config.sops.secrets.vaultwarden-env.path;
};
@ -6,7 +10,7 @@
services.vaultwarden = {
enable = true;
config = {
DOMAIN = "https://${config.services.caddy.virtualHosts.vaultwarden.hostName}";
DOMAIN = mylib.stripPort "https://${config.services.caddy.virtualHosts.vaultwarden.hostName}";
ROCKET_ADDRESS = "0.0.0.0";
ROCKET_PORT = 35381;
ROCKET_LOG = "critical";