diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2024-06-26 19:29:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-26 19:29:28 +0200 |
commit | 273f6bdff895f62549114a183686c4de666b69e3 (patch) | |
tree | eeea09439831b6532e36648c6c6556739104a089 /nixos/modules/services | |
parent | 3573b8e08336698b8fdf3a2ceee318725acd37b3 (diff) | |
parent | dff96ae65dd83bb5a49637edfd1fee8e3d0a7c2e (diff) |
Merge pull request #244684 from m-bdf/kmscon-use-upstream-service-file
nixos/kmscon: use upstream service file
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/ttys/kmscon.nix | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/nixos/modules/services/ttys/kmscon.nix b/nixos/modules/services/ttys/kmscon.nix index 031c5bbb383e..4803d577b94b 100644 --- a/nixos/modules/services/ttys/kmscon.nix +++ b/nixos/modules/services/ttys/kmscon.nix @@ -67,36 +67,24 @@ in { }; config = mkIf cfg.enable { - # Largely copied from unit provided with kmscon source - systemd.units."kmsconvt@.service".text = '' - [Unit] - Description=KMS System Console on %I - Documentation=man:kmscon(1) - After=systemd-user-sessions.service - After=plymouth-quit-wait.service - After=systemd-logind.service - After=systemd-vconsole-setup.service - Requires=systemd-logind.service - Before=getty.target - Conflicts=getty@%i.service - OnFailure=getty@%i.service - IgnoreOnIsolate=yes - ConditionPathExists=/dev/tty0 - - [Service] - ExecStart= - ExecStart=${pkgs.kmscon}/bin/kmscon "--vt=%I" ${cfg.extraOptions} --seats=seat0 --no-switchvt --configdir ${configDir} --login -- ${pkgs.shadow}/bin/login -p ${autologinArg} - UtmpIdentifier=%I - TTYPath=/dev/%I - TTYReset=yes - TTYVHangup=yes - TTYVTDisallocate=yes - - X-RestartIfChanged=false - ''; + systemd.packages = [ pkgs.kmscon ]; + + systemd.services."kmsconvt@" = { + after = [ "systemd-logind.service" "systemd-vconsole-setup.service" ]; + requires = [ "systemd-logind.service" ]; + + serviceConfig.ExecStart = [ + "" + '' + ${pkgs.kmscon}/bin/kmscon "--vt=%I" ${cfg.extraOptions} --seats=seat0 --no-switchvt --configdir ${configDir} --login -- ${pkgs.shadow}/bin/login -p ${autologinArg} + '' + ]; + + restartIfChanged = false; + aliases = [ "autovt@.service" ]; + }; systemd.suppressedSystemUnits = [ "autovt@.service" ]; - systemd.units."kmsconvt@.service".aliases = [ "autovt@.service" ]; systemd.services.systemd-vconsole-setup.enable = false; systemd.services.reload-systemd-vconsole-setup.enable = false; |