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:
parent
15a1efe023
commit
d809a9e6b2
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue