1 files changed, 13 insertions, 0 deletions
diff --git a/host/Rory-ovh/configuration.nix b/host/Rory-ovh/configuration.nix
index 2d86b19..d6d3461 100755
--- a/host/Rory-ovh/configuration.nix
+++ b/host/Rory-ovh/configuration.nix
@@ -128,6 +128,19 @@
spacebar
;
};
+
+ # prevent a hang on rebuild with forgotten shells...
+ systemd.services."container@spacebar" = {
+ # dependency on postgres for good measure...
+ after = [ "postgresql.service" ];
+ wants = [ "postgresql.service" ];
+ preStop = ''
+ for pid in $(pgrep -f "nixos-container root-login spacebar"); do
+ echo "Killing shell with PID $pid"
+ kill -9 $pid
+ done
+ '';
+ };
#containers."syntest1" = import ./services/containers/syntest1/container.nix {
# inherit
|