From 570ae8423df2865a8c7a4c0af3a37daf27c7dd56 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Thu, 24 Jul 2025 19:26:02 -0400 Subject: [PATCH] nixos/autovt: Pull in autovt@tty1 in Nix, not generateUnits --- nixos/lib/systemd-lib.nix | 3 --- nixos/modules/services/ttys/getty.nix | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/lib/systemd-lib.nix b/nixos/lib/systemd-lib.nix index 3b68d56d4541..97a797b47b0f 100644 --- a/nixos/lib/systemd-lib.nix +++ b/nixos/lib/systemd-lib.nix @@ -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/ ''} ''; # */ diff --git a/nixos/modules/services/ttys/getty.nix b/nixos/modules/services/ttys/getty.nix index 709bbff233d6..8fed34e73932 100644 --- a/nixos/modules/services/ttys/getty.nix +++ b/nixos/modules/services/ttys/getty.nix @@ -148,6 +148,8 @@ in "container-getty@.service" ]; + systemd.targets.getty.wants = [ "autovt@tty1.service" ]; + systemd.services."getty@" = { serviceConfig.ExecStart = [ # override upstream default with an empty ExecStart