nixos/kmscon: use upstream service file
This commit is contained in:
@@ -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
|
||||
systemd.packages = [ pkgs.kmscon ];
|
||||
|
||||
[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
|
||||
systemd.services."kmsconvt@" = {
|
||||
after = [ "systemd-logind.service" "systemd-vconsole-setup.service" ];
|
||||
requires = [ "systemd-logind.service" ];
|
||||
|
||||
X-RestartIfChanged=false
|
||||
'';
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user