From 249f493dd6b6d382ac7601d92216d1a839a88dbb Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 29 Jun 2015 22:36:25 +0200 Subject: kzerza: Power off system when GrandPA stops. This was the behaviour back then when NixOS still used upstart and after some searching I found that ExecStopPost is what we want here, despite its name (I'd imply that it is used in parts to stop the service rather than executed after the service has stopped). So in turn, it means that using Ctrl-Q within GrandPA shuts down the whole system. Signed-off-by: aszlig --- machines/aszlig/kzerza.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'machines') diff --git a/machines/aszlig/kzerza.nix b/machines/aszlig/kzerza.nix index 9ebb06b8..b1ec3633 100644 --- a/machines/aszlig/kzerza.nix +++ b/machines/aszlig/kzerza.nix @@ -54,12 +54,14 @@ in { serviceConfig = { Type = "idle"; ExecStart = "${pkgs.vuizvui.grandpa}/bin/grandpa"; + ExecStopPost = "${pkgs.systemd}/bin/systemctl poweroff"; StandardInput = "tty"; StandardOutput = "tty"; TTYPath = "/dev/tty7"; TTYVTDisallocate = true; User = "grandpa"; Group = "grandpa"; + PermissionsStartOnly = true; PrivateTmp = true; PrivateNetwork = true; }; -- cgit 1.4.1