php-fpm, vaultwarden
This commit is contained in:
parent
28e370709f
commit
3c8807e38f
3 changed files with 54 additions and 8 deletions
|
|
@ -15,7 +15,9 @@
|
||||||
swapDevices = [ { device = "/var/swapfile"; } ];
|
swapDevices = [ { device = "/var/swapfile"; } ];
|
||||||
boot.loader.limine = {
|
boot.loader.limine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
maxGenerations = 20;
|
||||||
secureBoot.enable = true;
|
secureBoot.enable = true;
|
||||||
|
panicOnChecksumMismatch = true;
|
||||||
};
|
};
|
||||||
users.users = {
|
users.users = {
|
||||||
root = {
|
root = {
|
||||||
|
|
|
||||||
4
marks
4
marks
|
|
@ -12,4 +12,6 @@ nixos-install --flake "/mnt/etc/nixos#nixos" --no-channel-copy --no-root-passwd
|
||||||
systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+2+7 <LUKS_DEV>
|
systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+2+7 <LUKS_DEV>
|
||||||
|
|
||||||
todo:
|
todo:
|
||||||
- lanzaboote
|
- php-fpm, postgresql, certbot
|
||||||
|
- postfix, dovecot, rspamd
|
||||||
|
- vaultwarden, gitea, mediawiki
|
||||||
|
|
|
||||||
|
|
@ -18,22 +18,64 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
#environment.systemPackages = with pkgs; [
|
||||||
|
#php
|
||||||
|
#];
|
||||||
services = {
|
services = {
|
||||||
|
postgresql.enable = true;
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = false;
|
openFirewall = false;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
phpfpm.pools.main = {
|
||||||
|
user = "nginx";
|
||||||
|
group = "nginx";
|
||||||
|
settings = {
|
||||||
|
"pm" = "ondemand";
|
||||||
|
"pm.max_children" = 8;
|
||||||
|
"listen.owner" = "nginx";
|
||||||
|
"listen.group" = "nginx";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts."_".default = true;
|
recommendedTlsSettings = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
recommendedBrotliSettings = true;
|
||||||
virtualHosts."_" = {
|
virtualHosts."_" = {
|
||||||
locations."/" = {
|
default = true;
|
||||||
return = "200 '<html><body>It works</body></html>'";
|
root = "/srv/http/_";
|
||||||
extraConfig = ''
|
locations."~ \\.php$".extraConfig = ''
|
||||||
default_type text/html;
|
fastcgi_pass unix:${config.services.phpfpm.pools.main.socket};
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
vaultwarden = {
|
||||||
|
enable = true;
|
||||||
|
configureNginx = true;
|
||||||
|
dbBackend = "postgresql";
|
||||||
|
configurePostgres = true;
|
||||||
|
package = pkgs.vaultwarden-postgresql;
|
||||||
|
domain = "https://wg.bogaledev.ru/vault";
|
||||||
|
environmentFile = "/root/secrets/vaultwarden.env";
|
||||||
|
config = {
|
||||||
|
EMAIL_TOKEN_SIZE = 8;
|
||||||
|
SMTP_SECURITY = "off";
|
||||||
|
SMTP_HOST = "localhost";
|
||||||
|
SIGNUPS_ALLOWED = false;
|
||||||
|
REQUIRE_DEVICE_EMAIL = true;
|
||||||
|
TRASH_AUTO_DELETE_DAYS = 90;
|
||||||
|
ROCKET_ADDRESS = "127.0.0.1";
|
||||||
|
PASSWORD_HINTS_ALLOWED = false;
|
||||||
|
EMERGENCY_ACCESS_ALLOWED = false;
|
||||||
|
SMTP_FROM = "vaultwarden@bogaledev.ru";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue