Arion: Add vaultwarden

This commit is contained in:
GHOSCHT 2024-03-07 16:47:24 +01:00
parent 6a3dc93ed1
commit 6b5be4cead
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
3 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{pkgs, ...}: {
project.name = "passwords";
networks.dmz = {
name = "dmz";
external = true;
};
services = {
vaultwarden.service = {
image = "vaultwarden/server:latest";
container_name = "vaultwarden";
labels = {
"traefik.enable" = "true";
"traefik.http.routers.vaultwarden.entrypoints" = "websecure";
"traefik.http.routers.vaultwarden.rule" = "Host(`vaultwarden.ghoscht.com`)";
"traefik.http.routers.vaultwarden.tls" = "true";
"traefik.http.routers.vaultwarden.tls.certresolver" = "letsencrypt";
};
volumes = [
"/home/ghoscht/.docker/infrastructure/vaultwarden_data/:/data"
];
environment = {
DOMAIN = "http://vaultwarden.ghoscht.com";
};
restart = "always";
networks = [
"dmz"
];
};
};
}

View file

@ -0,0 +1,6 @@
# Instead of pinning Nixpkgs, we can opt to use the one in NIX_PATH
import <nixpkgs> {
# We specify the architecture explicitly. Use a Linux remote builder when
# calling arion from other platforms.
system = "x86_64-linux";
}

View file

@ -0,0 +1,8 @@
{config, ...}: let
in {
virtualisation.arion = {
projects.password.settings = {
imports = [./arion-compose.nix];
};
};
}