mkStorageGuard returned a serviceConfig fragment, so ConditionPathIsMountPoint
landed in [Service] where systemd ignores it - the guard was dead on 13 units.
- helper now returns a unitConfig fragment ([Unit]); RequiresMountsFor still
intentionally absent
- consumers re-pointed at the real unit names: samba-smbd, phpfpm-nextcloud,
immich-server, podman-3xui_app, podman-taperotation-{backend,frontend};
the old serviceConfig keys silently rendered three empty phantom units
- vds excluded: otreca has no /home/oqyude/External and a live condition would
skip podman-3xui_app and kill the 3x-ui panel at pubray1.zeroq.su
Verified: sapphira and otreca toplevel builds exit 0; all 13 units carry the
condition under [Unit] (line 3), zero occurrences under [Service].
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
xlib,
|
|
...
|
|
}:
|
|
{
|
|
services = {
|
|
gitea = {
|
|
enable = true;
|
|
stateDir = "${xlib.dirs.services-mnt-folder}/gitea";
|
|
appName = "ZeroQ Gitea Service";
|
|
settings = {
|
|
server = {
|
|
# nixpkgs-unstable removed `DOMAIN` — must use the full public URL
|
|
# in `ROOT_URL` instead. External entry is HTTPS via nginx with
|
|
# ACME (modules/server/nginx.nix:53), so scheme is https, no port.
|
|
ROOT_URL = "https://git.zeroq.su/";
|
|
HTTP_PORT = 3000;
|
|
};
|
|
service.DISABLE_REGISTRATION = true;
|
|
# Enable Gitea Actions (CI/CD). gitea-runner.nix provides the runner
|
|
# service; this flag only turns on the server-side action handlers.
|
|
actions.ENABLED = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd = {
|
|
tmpfiles.rules = xlib.helpers.mkTmpDirs {
|
|
dir = config.services.gitea.stateDir;
|
|
mode = "0755";
|
|
user = "gitea";
|
|
group = "gitea";
|
|
};
|
|
# `unitConfig` → `[Unit]`: `ConditionPathIsMountPoint` is a unit-level
|
|
# directive and is ignored by systemd in `[Service]` (T4/R1.2).
|
|
services.gitea.unitConfig = xlib.helpers.mkStorageGuard xlib;
|
|
};
|
|
}
|