3
0
Fork 0
forked from mirrors/nixpkgs

mingetty: Option to not restart on service change.

This especially annoyed me whenver I was doing nixos-rebuild switch and getting
logged out on all consoles. With this there now is services.mingetty.dontRestart
for heavy VT users to deactivate this behaviour.
This commit is contained in:
aszlig 2012-08-12 07:15:56 +02:00
parent 15a1efe023
commit d809a9e6b2

View file

@ -46,6 +46,14 @@ with pkgs.lib;
''; '';
}; };
dontRestart = mkOption {
default = false;
description = ''
Don't restart mingetty processes as this will result in active
sessions to be logged out, for example on activation of the system's
configuration.
'';
};
}; };
}; };
@ -69,6 +77,8 @@ with pkgs.lib;
exec = "mingetty --loginprog=${pkgs.shadow}/bin/login --noclear ${tty}"; exec = "mingetty --loginprog=${pkgs.shadow}/bin/login --noclear ${tty}";
restartIfChanged = !config.services.mingetty.dontRestart;
environment.LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; environment.LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
}) config.services.mingetty.ttys); }) config.services.mingetty.ttys);