Arion: Add vaultwarden
This commit is contained in:
parent
6a3dc93ed1
commit
6b5be4cead
3 changed files with 46 additions and 0 deletions
32
hosts/franz/arion/passwords/arion-compose.nix
Normal file
32
hosts/franz/arion/passwords/arion-compose.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
6
hosts/franz/arion/passwords/arion-pkgs.nix
Normal file
6
hosts/franz/arion/passwords/arion-pkgs.nix
Normal 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";
|
||||
}
|
8
hosts/franz/arion/passwords/default.nix
Normal file
8
hosts/franz/arion/passwords/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{config, ...}: let
|
||||
in {
|
||||
virtualisation.arion = {
|
||||
projects.password.settings = {
|
||||
imports = [./arion-compose.nix];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue