mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
feat: provisioned resources properly across microvms
This commit is contained in:
parent
857f2e39a8
commit
30593b866e
11 changed files with 42 additions and 91 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -55,26 +56,20 @@ in
|
|||
SITE_OWNER = email.address2;
|
||||
};
|
||||
};
|
||||
|
||||
phpfpm.pools.firefly-iii.phpEnv = {
|
||||
TRUSTED_PROXIES = "*";
|
||||
APP_URL = "https://${host}";
|
||||
};
|
||||
|
||||
firefly-iii-data-importer = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
caddy = {
|
||||
enable = true;
|
||||
virtualHosts.":80" = {
|
||||
extraConfig = ''
|
||||
root * ${config.services.firefly-iii.package}/public
|
||||
|
||||
file_server
|
||||
|
||||
encode gzip
|
||||
|
||||
php_fastcgi unix//run/phpfpm/firefly-iii.sock {
|
||||
env HTTPS {http.request.header.X-Forwarded-Proto}
|
||||
env HTTP_X_FORWARDED_PROTO {http.request.header.X-Forwarded-Proto}
|
||||
|
|
@ -82,7 +77,6 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "firefly-iii" ];
|
||||
|
|
@ -93,7 +87,6 @@ in
|
|||
}
|
||||
];
|
||||
};
|
||||
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -102,18 +95,15 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.users.caddy = {
|
||||
extraGroups = [ "firefly-iii" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
22
|
||||
80
|
||||
serviceCfg.ports.port0
|
||||
serviceCfg.ports.port1
|
||||
];
|
||||
|
||||
systemd = {
|
||||
services = {
|
||||
caddy = {
|
||||
|
|
@ -161,15 +151,13 @@ in
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
tmpfiles.rules = [
|
||||
"Z ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||
];
|
||||
};
|
||||
|
||||
microvm = {
|
||||
vcpu = 1;
|
||||
mem = 1024;
|
||||
mem = 512;
|
||||
hypervisor = "qemu";
|
||||
interfaces = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue