Setup vaultwarden on astral

This commit is contained in:
Nettika 2025-10-08 21:45:43 -07:00
parent 660426df1f
commit b665d7cffe
8 changed files with 51 additions and 22 deletions

View file

@ -1,9 +1,10 @@
{ nixosModules, modulesPath, lib, pkgs, ... }: {
{ modulesPath, nixosModules, agenix, lib, pkgs, config, ... }: {
imports = [
"${modulesPath}/virtualisation/amazon-image.nix"
nixosModules.nano
nixosModules.nettika
nixosModules.promptmoji
agenix.nixosModules.default
];
boot.loader.grub.device = lib.mkForce "/dev/nvme0n1";
@ -14,7 +15,10 @@
dates = "weekly";
options = "--delete-older-than 30d";
};
settings.trusted-users = [ "@wheel" ];
settings = {
trusted-users = [ "@wheel" ];
experimental-features = [ "nix-command" "flakes" ];
};
};
networking = {
@ -22,6 +26,8 @@
firewall.allowedTCPPorts = [ 80 443 ];
};
age.secrets.vaultwarden-env.file = ./secrets/vaultwarden-env.age;
users.defaultUserShell = pkgs.fish;
security.sudo.wheelNeedsPassword = false;
@ -33,9 +39,28 @@
respond "astral is online"
header Strict-Transport-Security: "max-age=63072000; includeSubDomains"
'';
"vault.leaf.ninja".extraConfig = ''
reverse_proxy localhost:8222
'';
};
};
services.vaultwarden = {
enable = true;
config = {
domain = "https://vault.leaf.ninja";
signupsAllowed = false;
rocketAddress = "0.0.0.0";
rocketPort = 8222;
smtpHost = "smtp.migadu.com";
smtpFrom = "vaultwarden@leaf.ninja";
smtpPort = 587;
smtpSecurity = "starttls";
smtpUsername = "vaultwarden@leaf.ninja";
};
environmentFile = config.age.secrets.vaultwarden-env.path;
};
programs.fish.enable = true;
documentation.man.generateCaches = false;

Binary file not shown.

View file

@ -1,25 +1,24 @@
{ self, nixpkgs, phps, agenix, ... }:
let inherit (nixpkgs.lib) nixosSystem;
let
baseSpecialArgs = {
inherit (self) nixosModules;
inherit agenix;
};
nixosSystem = args:
nixpkgs.lib.nixosSystem
(nixpkgs.lib.recursiveUpdate args { specialArgs = baseSpecialArgs; });
in {
marauder = nixosSystem {
system = "x86_64-linux";
modules = [ ./marauder ];
specialArgs = {
inherit (self) nixosModules;
inherit phps agenix;
};
specialArgs = { inherit phps; };
};
astral = nixosSystem {
system = "x86_64-linux";
modules = [ ./astral ];
specialArgs = { inherit (self) nixosModules; };
};
quasar = nixosSystem {
system = "x86_64-linux";
modules = [ ./quasar ];
specialArgs = {
inherit (self) nixosModules;
inherit agenix;
};
};
}

View file

@ -1,5 +1,6 @@
age-encryption.org/v1
-> ssh-ed25519 f+PJrQ qccE2xAzfBZ3DCRQtQDgwS1UzjlZx44oUrYjcDfMfDk
I2l6xRJsdQLYB2cMo0Kfi6mVyhZsuSPFG574P8pl12Y
--- WoBlo7fqYRkiBYPoLpa3wHB8ZPCVy32a4aL5UswCHJc
LŁćΚČ[¤Nî<#Ő]<5D> ź<>üBÄ}×fË%P„ôxK±Ű¨ţkI˝©”<§V<C2A7>ź…¶YÄ5#ĺ±đ÷ű”qEł4­®¶l—ËřFľ“8ukȨ<C48C>űÂ%Ŕ´U53yěű"Ťg\î<>©ŞZćŮC®őWĄ˛g­z
-> ssh-ed25519 f+PJrQ VJshLBSbF93anR9fOJ3Kwhxh1AOdvsS0hoJ86Bw9oBQ
It8hELrRN+EYt9nv75lVHha+ZDUhCDNQVczDZVlDCBs
--- xzJ/50+WOA+IWRXiAvBbJLUlsgsSztQrzbimng2QdlU
<EFBFBD>´Ï¬jÒ<>ÿ8K7$ðwÃbԲǰ€Ì~]NBª]QÐM+cw
þþÔJ•o—Í”ÔSîØš!N¨Du¦OÈnçZnNâæÍѵV¬:ŒŸ®¬kúÝcó)|æŒJ…opÇSÎH˜«f§ùØu1šã9Çå

View file

@ -28,7 +28,7 @@
matrix-synapse-secrets.file = ./secrets/matrix-synapse-secrets.age;
};
services.postgresql = { enable = true; };
services.postgresql.enable = true;
services.caddy = {
enable = true;