Merge remote-tracking branch 'refs/remotes/origin/master'
This commit is contained in:
commit
1aa7222be4
3 changed files with 52 additions and 23 deletions
16
flake.lock
16
flake.lock
|
@ -1928,11 +1928,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716656108,
|
"lastModified": 1721236649,
|
||||||
"narHash": "sha256-DyBZoOO9ayXzvj3dNf47EvRZq/3ep/i71z4R0FkrW10=",
|
"narHash": "sha256-aQCYsCicXN/p4VAYmWNvB7m4JLBOssHV9Lfa/L6VU/A=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "3d0d0da61adce29297658ee1e5930c092251398a",
|
"rev": "2f8dd60760275c9bb94fd4d7d3510088c8d78ae0",
|
||||||
"revCount": 22,
|
"revCount": 23,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.jacekpoz.pl/jacekpoz/nte"
|
"url": "https://git.jacekpoz.pl/jacekpoz/nte"
|
||||||
},
|
},
|
||||||
|
@ -3676,11 +3676,11 @@
|
||||||
"nte": "nte"
|
"nte": "nte"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719149812,
|
"lastModified": 1721295130,
|
||||||
"narHash": "sha256-EYFzAYAvC+3Xe5TrzKpoF8C/51tnVPaD4TSv6ZBkGU8=",
|
"narHash": "sha256-QmlIJfgFZmYpXTDtXpgpapMb0Hw/3ZiK0KPrNCnCq/k=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "0de6d59fafad70712000636a28c8038d5e3c3a11",
|
"rev": "3bae9b7288920b305945e882623c87fa0c31f7b7",
|
||||||
"revCount": 261,
|
"revCount": 282,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://jacekpoz/jacekpoz/pozsite.git"
|
"url": "ssh://jacekpoz/jacekpoz/pozsite.git"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (lib) getExe';
|
||||||
|
|
||||||
|
systemctl = getExe' pkgs.systemd "systemctl";
|
||||||
|
|
||||||
port = 4827;
|
port = 4827;
|
||||||
|
sitePath = "/srv/web/jacekpoz.pl";
|
||||||
in {
|
in {
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -28,22 +34,46 @@ in {
|
||||||
group = "site";
|
group = "site";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.pozback = {
|
systemd = {
|
||||||
description = "The backend for jacekpoz.pl";
|
services = {
|
||||||
wantedBy = ["default.target"];
|
pozback = {
|
||||||
|
description = "The backend for jacekpoz.pl";
|
||||||
|
after = ["network.target"];
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${inputs.pozsite.packages.${pkgs.system}.pozback}/bin/back";
|
ExecStart = "${inputs.pozsite.packages.${pkgs.system}.pozback}/bin/back";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
Environment = ''POZ_PORT="${toString port}" POZ_DIR="/srv/web/jacekpoz.pl"'';
|
Environment = ''POZ_PORT="${toString port}" POZ_DIR="${sitePath}"'';
|
||||||
User = "site";
|
User = "site";
|
||||||
Group = "site";
|
Group = "site";
|
||||||
|
};
|
||||||
|
|
||||||
|
path = with pkgs; [
|
||||||
|
fastfetch
|
||||||
|
colorized-logs
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
pozback-watcher = {
|
||||||
|
description = "Restarter for the backend";
|
||||||
|
after = ["network.target"];
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${systemctl} restart pozback.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
paths.pozback-watcher = {
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
|
||||||
path = with pkgs; [
|
pathConfig = {
|
||||||
fastfetch
|
PathModified = sitePath;
|
||||||
colorized-logs
|
Unit = "pozback-watcher.service";
|
||||||
];
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@ in {
|
||||||
inherit port;
|
inherit port;
|
||||||
max_request_size = 100000000;
|
max_request_size = 100000000;
|
||||||
conduit_cache_capacity_modifier = 4.0;
|
conduit_cache_capacity_modifier = 4.0;
|
||||||
rocksdb_max_open_files = 20;
|
|
||||||
allow_check_for_updates = false;
|
allow_check_for_updates = false;
|
||||||
allow_registration = false;
|
allow_registration = false;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue