Skip to content

Commit

Permalink
fbflut: only override autologin on first tty
Browse files Browse the repository at this point in the history
systemd seems to always give drop-ins priority, even if less specific.
luckily the new-ish overrideStrategy option allows us to make a drop-in:
NixOS/nixpkgs#80933 (comment)
  • Loading branch information
xfnw committed Nov 1, 2023
1 parent 08afa7d commit 1af40c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion configuration/fbflut.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
with pkgs;

let
gcfg = config.services.getty;
fbflut =
stdenv.mkDerivation rec {
pname = "fbflut";
Expand Down Expand Up @@ -33,5 +34,10 @@ in
group = "video";
shell = "${fbflut}/bin/fbflut";
};
services.getty.autologinUser = "fbflut";

systemd.services."getty@tty1".overrideStrategy = "asDropin";
systemd.services."getty@tty1".serviceConfig.ExecStart = [
""
"@${pkgs.util-linux}/sbin/agetty agetty --login-program ${gcfg.loginProgram} --autologin fbflut --noclear --keep-baud %I 115200,38400,9600 $TERM"
];
}

0 comments on commit 1af40c6

Please sign in to comment.