nixos/display-manager: Disable the dependency on autovt@tty1 rather than masking it
This commit is contained in:
parent
aa855cb1a2
commit
8cb99658bd
@ -267,12 +267,6 @@ in
|
||||
in
|
||||
lib.mkIf noDmUsed (lib.mkDefault false);
|
||||
|
||||
# We can't just rely on 'Conflicts=autovt@tty1.service' because
|
||||
# 'switch-to-configuration switch' will start 'autovt@tty1.service'
|
||||
# and kill us.
|
||||
systemd.services."autovt@tty1".enable =
|
||||
lib.mkIf config.systemd.services.display-manager.enable false;
|
||||
|
||||
systemd.services.display-manager = {
|
||||
description = "Display Manager";
|
||||
after = [
|
||||
|
||||
@ -148,7 +148,14 @@ in
|
||||
"container-getty@.service"
|
||||
];
|
||||
|
||||
systemd.targets.getty.wants = [ "autovt@tty1.service" ];
|
||||
# We can't just rely on 'Conflicts=autovt@tty1.service' because
|
||||
# 'switch-to-configuration switch' will start 'autovt@tty1.service'
|
||||
# and kill the display manager.
|
||||
systemd.targets.getty.wants =
|
||||
lib.mkIf (!(config.systemd.services.display-manager.enable or false))
|
||||
[
|
||||
"autovt@tty1.service"
|
||||
];
|
||||
|
||||
systemd.services."getty@" = {
|
||||
serviceConfig.ExecStart = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user