First commit

This commit is contained in:
2025-07-22 02:30:15 +02:00
commit e9441f563b
66 changed files with 4401 additions and 0 deletions

56
modules/tty/default.nix Normal file
View File

@@ -0,0 +1,56 @@
{
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 ";
};
};
}