niksos/hosts/chmura/jacekpoz.pl.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

2024-05-22 12:10:48 +02:00
{
inputs,
pkgs,
...
}: let
port = 4827;
in {
2023-11-25 17:12:09 +01:00
services.caddy = {
enable = true;
virtualHosts = {
"jacekpoz.pl".extraConfig = ''
reverse_proxy localhost:${toString port}
'';
"jpoz.pl".extraConfig = ''
redir / https://jacekpoz.pl
redir /git https://jacekpoz.pl/posts/git-workflow.html
'';
"jacek.poziem.ski".extraConfig = ''
redir https://jacekpoz.pl
'';
};
2023-11-25 17:12:09 +01:00
};
2024-05-22 12:10:48 +02:00
2024-05-22 12:16:26 +02:00
users.groups.site = {};
users.users.site = {
isSystemUser = true;
group = "site";
};
2024-05-22 12:10:48 +02:00
systemd.services.pozback = {
description = "The backend for jacekpoz.pl";
wantedBy = ["default.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${inputs.pozsite.packages.${pkgs.system}.pozback}/bin/back";
Restart = "on-failure";
Environment = ''ROCKET_PORT="${toString port}" ROCKET_WEB_DIR="/srv/web/jacekpoz.pl"'';
2024-05-22 12:16:26 +02:00
User = "site";
Group = "site";
2024-05-22 12:10:48 +02:00
};
path = with pkgs; [
fastfetch
colorized-logs
];
};
2023-11-25 17:12:09 +01:00
}