Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions nixos/services/pm-stack/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ in
};
Service = {
Type = "simple";
# The management plane has to answer while the fleet is
# compiling (load average 75 on 16 cores, 2026-11-22): under
# contention this unit gets nine times a default unit's share.
CPUWeight = 900;
# Every state file is env-pinned below or in the .env
# file; the state dir as cwd makes any unpinned cwd
# default in the config land in state too, never in a
Expand Down Expand Up @@ -329,6 +333,10 @@ in
};
Service = {
Type = "simple";
# The management plane has to answer while the fleet is
# compiling (load average 75 on 16 cores, 2026-11-22): under
# contention this unit gets nine times a default unit's share.
CPUWeight = 900;
# The app has no cwd-relative access of its own (its
# paths come from the env files below); the deployment
# dir stays as cwd because that is where its rendered
Expand Down Expand Up @@ -513,6 +521,10 @@ in
};
Service = {
Type = "simple";
# The management plane has to answer while the fleet is
# compiling (load average 75 on 16 cores, 2026-11-22): under
# contention this unit gets nine times a default unit's share.
CPUWeight = 900;
WorkingDirectory = "${stackDir}";
# tunnel.token is rendered by the pm-kaneo deploy flow
# (deploy.sh) from the same SOPS secret as the old
Expand Down
6 changes: 6 additions & 0 deletions pm-stack/console/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ if [ ! -f "$STATE/.env" ]; then
printf 'PM_CONSOLE_PORT=4872\nPM_CONSOLE_OWNER_EMAILS=\n' >"$STATE/.env"
fi
install -m 644 "$UNIT_SRC" "$UNIT_DST"
# The timer keeps the public address as declared, and turns Google
# sign-in on by itself once its two secrets exist.
for unit in pm-console-expose.service pm-console-expose.timer; do
install -m 644 "$(dirname "$SRC")/systemd/$unit" "$(dirname "$UNIT_DST")/$unit"
done
systemctl --user daemon-reload
systemctl --user enable pm-console.service >/dev/null
systemctl --user restart pm-console.service
systemctl --user enable --now pm-console-expose.timer >/dev/null

# systemd strips one pair of quotes from an EnvironmentFile value, so
# PM_CONSOLE_PORT="4872" is a valid line: read it the same way.
Expand Down
Loading