diff options
Diffstat (limited to 'nixos/modules/config/console.nix')
-rw-r--r-- | nixos/modules/config/console.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/nixos/modules/config/console.nix b/nixos/modules/config/console.nix index 1339227f1e022..84ad76246fdb7 100644 --- a/nixos/modules/config/console.nix +++ b/nixos/modules/config/console.nix @@ -144,11 +144,16 @@ in ''} ''; - systemd.services.systemd-vconsole-setup = - { - before = optional config.services.xserver.enable "display-manager.service"; - after = [ "systemd-udev-settle.service" ]; + systemd.services.reload-systemd-vconsole-setup = + { description = "Reset console on configuration changes"; + wantedBy = [ "multi-user.target" ]; restartTriggers = [ vconsoleConf consoleEnv ]; + reloadIfChanged = true; + serviceConfig = + { RemainAfterExit = true; + ExecStart = "${pkgs.coreutils}/bin/true"; + ExecReload = "/run/current-system/systemd/bin/systemctl restart systemd-vconsole-setup"; + }; }; } |