Added vault warden
This commit is contained in:
parent
85ec8190f9
commit
5832a92555
|
@ -2,6 +2,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./services/openssh.nix
|
./services/openssh.nix
|
||||||
./services/forgejo.nix
|
./services/forgejo.nix
|
||||||
|
./services/vaultwarden.nix
|
||||||
./services/misc.nix
|
./services/misc.nix
|
||||||
|
|
||||||
./modules/git.nix
|
./modules/git.nix
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
boot.initrd.availableKernelModules = ["vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||||
|
|
|
@ -10,10 +10,12 @@
|
||||||
|
|
||||||
# Static ip
|
# Static ip
|
||||||
networking.interfaces.enp2s0 = {
|
networking.interfaces.enp2s0 = {
|
||||||
ipv4.addresses = [{
|
ipv4.addresses = [
|
||||||
|
{
|
||||||
address = "10.0.201.83";
|
address = "10.0.201.83";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
networking.defaultGateway = {
|
networking.defaultGateway = {
|
||||||
address = "10.0.201.1";
|
address = "10.0.201.1";
|
||||||
|
|
34
services/vaultwarden.nix
Normal file
34
services/vaultwarden.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{...}: let
|
||||||
|
host = "127.0.0.1";
|
||||||
|
port = 8222;
|
||||||
|
in {
|
||||||
|
services.vaultwarden = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
DOMAIN = "https://bitwarden.spoodythe.one";
|
||||||
|
SIGNUPS_ALLOWED = false;
|
||||||
|
|
||||||
|
ROCKET_ADDRESS = host;
|
||||||
|
ROCKET_PORT = port;
|
||||||
|
ROCKET_LOG = "critical";
|
||||||
|
|
||||||
|
SMTP_HOST = host;
|
||||||
|
SMTP_PORT = 25;
|
||||||
|
SMTP_SSL = false;
|
||||||
|
|
||||||
|
SMTP_FROM = "admin@bitwarden.spoodythe.one";
|
||||||
|
SMTP_FROM_NAME = "SpoodyThe.One Bitwarden Server";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [port];
|
||||||
|
networking.firewall.allowedUDPPorts = [port];
|
||||||
|
|
||||||
|
services.caddy = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts."bitwarden.spoodythe.one".extraConfig = ''
|
||||||
|
reverse_proxy * ${host}:${toString port}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue