Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
bfd83c4c64
|
|||
|
9a6fdecb03
|
@@ -19,7 +19,7 @@ in {
|
||||
locations."/".proxyPass = "http://${cfg.settings.HOST}:${cfg.settings.PORT}";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/uptime-kuma" = {
|
||||
fileSystems."/var/lib/private/uptime-kuma" = {
|
||||
device = stateDir;
|
||||
fsType = "bind";
|
||||
options = [ "bind" ];
|
||||
|
||||
@@ -228,14 +228,9 @@ in {
|
||||
};
|
||||
in lib.mkForce "${lib.getExe cfg.package} dump ${args}";
|
||||
|
||||
# Only keep n backup files at a time
|
||||
postStop = let
|
||||
cu = prog: "'${lib.getExe' pkgs.coreutils prog}'";
|
||||
backupCount = 3;
|
||||
in ''
|
||||
for file in $(${cu "ls"} -t1 '${cfg.dump.backupDir}' | ${cu "sort"} --reverse | ${cu "tail"} -n+${toString (backupCount + 1)}); do
|
||||
${cu "rm"} "$file"
|
||||
done
|
||||
'';
|
||||
# Only keep a single backup file at a time.
|
||||
postStop = ''
|
||||
${lib.getExe' pkgs.coreutils "mv"} '${cfg.dump.backupDir}'/gitea-dump-*.tar.gz gitea-dump.tar.gz
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.postfix.enable = lib.mkForce false;
|
||||
|
||||
@@ -9,26 +9,4 @@
|
||||
remotes = "mail.pvv.ntnu.no smtp --port=25";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.sockets.userweb-sendmail-sandbox-proxy = {
|
||||
wantedBy = [ "sockets.target" ];
|
||||
listenStreams = [ "/run/userweb-sendmail-sandbox-proxy.sock" ];
|
||||
socketConfig = {
|
||||
# Accept = true;
|
||||
SocketUser = "httpd";
|
||||
SocketGroup = "httpd"; # TODO: is wwwrun(54) in this group?
|
||||
SocketMode = "0660";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.userweb-sendmail-sandbox-proxy = {
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
Group = "root";
|
||||
Sockets = [
|
||||
"userweb-sendmail-sandbox-proxy.socket"
|
||||
];
|
||||
ExecStart = "${lib.getExe pkgs.hello}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user