{ config, pkgs, ... }@attrs: let cfg = config.services.getty; in { programs.bash = { promptInit = '' [[ "$TERM" == "xterm-kitty" ]] && export TERM="xterm" [[ -f ${pkgs.nitch}/bin/nitch ]] && nitch if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then hyprland --config /etc/xdg/hypr/hyprland.conf fi ''; }; ## all tty autologin #services.getty.autologinUser = "beastie"; ## if all tty autologin login once #services.getty.autologinOnce ## only tty1 autologin systemd.services."getty@tty1" = { overrideStrategy = "asDropin"; serviceConfig.ExecStart = [ "" "${pkgs.util-linux}/bin/agetty --login-program ${cfg.loginProgram} --autologin ${attrs.username} --noclear --keep-baud %I 115200,38400,9600 $TERM" ]; }; environment = { systemPackages = with pkgs; [ nitch ]; etc = { "inputrc".source = ./config/inputrc; }; shellAliases = { ls = "ls --color=auto"; ll = "ls --color=auto -lha"; grep = "grep --color=auto"; ip = "ip -color=auto"; vi = "nvim"; }; variables = { EDITOR = "nvim"; BROWSER = "firefox"; HISTSIZE = 10000; HISTTIMEFORMAT = "%F %T "; }; }; }