diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-06-29 22:36:25 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-06-29 22:36:25 +0200 |
commit | 249f493dd6b6d382ac7601d92216d1a839a88dbb (patch) | |
tree | d328bcbf4bdaea1ce6f52eb09472d585df6cc1d5 | |
parent | d0b196a78efcf3b38ccc414654c7c95c5e1ae678 (diff) |
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 <aszlig@redmoonstudios.org>
-rw-r--r-- | machines/aszlig/kzerza.nix | 2 |
1 files changed, 2 insertions, 0 deletions
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; }; |