flake update, niri stuff
This commit is contained in:
parent
83c92deef5
commit
5d8e3292d2
15 changed files with 454 additions and 193 deletions
|
|
@ -10,5 +10,6 @@
|
|||
./dawarich.nix
|
||||
./forgejo.nix
|
||||
./lauti.nix
|
||||
./vaultwarden.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
49
modules/server/misc/vaultwarden.nix
Normal file
49
modules/server/misc/vaultwarden.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
server.misc.vaultwarden = {
|
||||
enable = lib.mkEnableOption "enable dawarich";
|
||||
port = lib.mkOption {
|
||||
default = 8000;
|
||||
description = "vaultwarden port";
|
||||
};
|
||||
public = lib.mkEnableOption "make vaultwarden public";
|
||||
subdomain = lib.mkOption {
|
||||
default = "vault";
|
||||
description = "vaultwarden subdomain";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
services = {
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
config = {
|
||||
DOMAIN = "https://${config.server.misc.vaultwarden.subdomain}.${config.networking.domain}";
|
||||
SIGNUPS_ALLOWED = false;
|
||||
};
|
||||
};
|
||||
nginx = {
|
||||
virtualHosts = {
|
||||
"${config.server.misc.vaultwarden.subdomain}.${config.networking.domain}" =
|
||||
if config.server.misc.vaultwarden.public then
|
||||
{
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.server.misc.vaultwarden.port}";
|
||||
};
|
||||
}
|
||||
else
|
||||
{ };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue