Re-add Vaultwarden
This commit is contained in:
parent
712828efc4
commit
c94447d0c1
4 changed files with 72 additions and 0 deletions
|
@ -23,6 +23,8 @@
|
||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
paperless.enable = true;
|
paperless.enable = true;
|
||||||
uptime-kuma.enable = true;
|
uptime-kuma.enable = true;
|
||||||
|
|
||||||
|
vaultwarden.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
"talking-drupal-tailwindcss.oliverdavies.uk"
|
"talking-drupal-tailwindcss.oliverdavies.uk"
|
||||||
"tome.oliverdavies.uk"
|
"tome.oliverdavies.uk"
|
||||||
"uptime.oliverdavies.uk"
|
"uptime.oliverdavies.uk"
|
||||||
|
"vaultwarden.oliverdavies.uk"
|
||||||
"wp-tailwind.oliverdavies.uk"
|
"wp-tailwind.oliverdavies.uk"
|
||||||
"www.oliverdavies.uk"
|
"www.oliverdavies.uk"
|
||||||
"zet.oliverdavies.uk"
|
"zet.oliverdavies.uk"
|
||||||
|
|
|
@ -3,5 +3,6 @@
|
||||||
./homepage
|
./homepage
|
||||||
./samba.nix
|
./samba.nix
|
||||||
./uptime-kuma.nix
|
./uptime-kuma.nix
|
||||||
|
./vaultwarden.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
68
hosts/nixedo/services/vaultwarden.nix
Normal file
68
hosts/nixedo/services/vaultwarden.nix
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
options,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = homelab.services.${service};
|
||||||
|
homelab = config.features.homelab;
|
||||||
|
service = "vaultwarden";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.features.homelab.services.${service} = {
|
||||||
|
enable = mkEnableOption "Enable ${service}";
|
||||||
|
|
||||||
|
url = mkOption {
|
||||||
|
default = "${service}.${homelab.baseDomain}";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
homepage.name = mkOption {
|
||||||
|
default = "Vaultwarden";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
homepage.description = mkOption {
|
||||||
|
default = "Unofficial Bitwarden compatible server written in Rust";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
homepage.icon = mkOption {
|
||||||
|
default = "bitwarden";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
homepage.category = mkOption {
|
||||||
|
default = "Services";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services = {
|
||||||
|
${service} = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
DOMAIN = "https://${cfg.url}";
|
||||||
|
ROCKET_PORT = 8222;
|
||||||
|
SIGNUPS_ALLOWED = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx.virtualHosts.${cfg.url} = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = homelab.baseDomain;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:${toString config.services.${service}.config.ROCKET_PORT}";
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue