Commit 8cb99658 authored by Will Fancher's avatar Will Fancher
Browse files

nixos/display-manager: Disable the dependency on autovt@tty1 rather than masking it

parent aa855cb1
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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 = [
+8 −1
Original line number Diff line number Diff line
@@ -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 = [