Unverified Commit ae766afd authored by K900's avatar K900 Committed by GitHub
Browse files

nixos/display-managers: tty1 everywhere (#428972)

parents 46da9ea7 431a9761
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -60,6 +60,8 @@

- `go-mockery` has been updated to v3. For migration instructions see the [upstream documentation](https://vektra.github.io/mockery/latest/v3/). If v2 is still required `go-mockery_v2` has been added but will be removed on or before 2029-12-31 in-line with it's [upstream support lifecycle](https://vektra.github.io/mockery/

- NixOS display manager modules now strictly use tty1, where many of them previously used tty7. Options to configure display managers' VT have been dropped. A configuration with a display manager enabled will not start `getty@tty1.service`, even if the system is forced to boot into `multi-user.target` instead of `graphical.target`.

## Other Notable Changes {#sec-nixpkgs-release-25.11-notable-changes}

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+0 −3
Original line number Diff line number Diff line
@@ -526,9 +526,6 @@ rec {
          ln -s ${cfg.ctrlAltDelUnit} $out/ctrl-alt-del.target
          ln -s rescue.target $out/kbrequest.target

          mkdir -p $out/getty.target.wants/
          ln -s ../autovt@tty1.service $out/getty.target.wants/

          ln -s ../remote-fs.target $out/multi-user.target.wants/
        ''}
      ''; # */
+10 −0
Original line number Diff line number Diff line
@@ -267,12 +267,22 @@ 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 = [
        "acpid.service"
        "systemd-logind.service"
        "systemd-user-sessions.service"
        "autovt@tty1.service"
      ];
      conflicts = [
        "autovt@tty1.service"
      ];
      restartIfChanged = false;

+0 −3
Original line number Diff line number Diff line
@@ -190,7 +190,6 @@ in
    users.groups.gdm.gid = config.ids.gids.gdm;

    # GDM needs different xserverArgs, presumable because using wayland by default.
    services.xserver.tty = null;
    services.xserver.display = null;
    services.xserver.verbose = null;

@@ -260,12 +259,10 @@ in
      "rc-local.service"
      "systemd-machined.service"
      "systemd-user-sessions.service"
      "getty@tty${gdm.initialVT}.service"
      "plymouth-quit.service"
      "plymouth-start.service"
    ];
    systemd.services.display-manager.conflicts = [
      "getty@tty${gdm.initialVT}.service"
      "plymouth-quit.service"
    ];
    systemd.services.display-manager.onFailure = [
+10 −10
Original line number Diff line number Diff line
@@ -6,10 +6,18 @@
}:
let
  cfg = config.services.greetd;
  tty = "tty${toString cfg.vt}";
  tty = "tty1";
  settingsFormat = pkgs.formats.toml { };
in
{
  imports = [
    (lib.mkRemovedOptionModule [
      "services"
      "greetd"
      "vt"
    ] "The VT is now fixed to VT1.")
  ];

  options.services.greetd = {
    enable = lib.mkEnableOption "greetd, a minimal and flexible login manager daemon";

@@ -41,14 +49,6 @@ in
      '';
    };

    vt = lib.mkOption {
      type = lib.types.int;
      default = 1;
      description = ''
        The virtual console (tty) that greetd should use. This option also disables getty on that tty.
      '';
    };

    restart = lib.mkOption {
      type = lib.types.bool;
      default = !(cfg.settings ? initial_session);
@@ -62,7 +62,7 @@ in
  };
  config = lib.mkIf cfg.enable {

    services.greetd.settings.terminal.vt = lib.mkDefault cfg.vt;
    services.greetd.settings.terminal.vt = 1;
    services.greetd.settings.default_session.user = lib.mkDefault "greeter";

    security.pam.services.greetd = {
Loading