From ee9f1c437d4a2c3667d0803646a0d7efd3198869 Mon Sep 17 00:00:00 2001 From: benaryorg Date: Fri, 29 Aug 2025 13:15:35 +0000 Subject: [PATCH] nixos/display-managers: phosh on tty1 As #428972 was merged this seems to be the correct setting for *phosh*. Specifically when using *mobile-nixos* this will fix issues of some devices (Lenovo Krane and Pinephone) not switching to *phosh* on startup (as they will remain on *tty1*). Signed-off-by: benaryorg --- nixos/modules/services/x11/desktop-managers/phosh.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/x11/desktop-managers/phosh.nix b/nixos/modules/services/x11/desktop-managers/phosh.nix index 12118089a1f7..2a05a37bea05 100644 --- a/nixos/modules/services/x11/desktop-managers/phosh.nix +++ b/nixos/modules/services/x11/desktop-managers/phosh.nix @@ -183,8 +183,11 @@ in config = lib.mkIf cfg.enable { # Inspired by https://gitlab.gnome.org/World/Phosh/phosh/-/blob/main/data/phosh.service + # Parts taken from nixos/modules/services/wayland/cage.nix systemd.services.phosh = { wantedBy = [ "graphical.target" ]; + after = [ "getty@tty1.service" ]; + conflicts = [ "getty@tty1.service" ]; serviceConfig = { ExecStart = "${cfg.package}/bin/phosh-session"; User = cfg.user; @@ -193,7 +196,7 @@ in WorkingDirectory = "~"; Restart = "always"; - TTYPath = "/dev/tty7"; + TTYPath = "/dev/tty1"; TTYReset = "yes"; TTYVHangup = "yes"; TTYVTDisallocate = "yes"; @@ -204,7 +207,7 @@ in StandardError = "journal"; # Log this user with utmp, letting it show up with commands 'w' and 'who'. - UtmpIdentifier = "tty7"; + UtmpIdentifier = "tty1"; UtmpMode = "user"; }; environment = {