This commit is contained in:
caandt 2024-12-28 11:01:20 -05:00
parent a413aa02e5
commit dc493d1ac1
3 changed files with 6 additions and 2 deletions

View file

@ -2,13 +2,14 @@
services.openssh = { services.openssh = {
enable = true; enable = true;
ports = [2291]; ports = [2291];
extraConfig = "AuthorizedKeysFile %h/.local/ssh/authorized_keys"; authorizedKeysFiles = ["%h/.local/ssh/authorized_keys"];
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
PermitRootLogin = "no"; PermitRootLogin = "no";
}; };
}; };
networking.firewall.allowedTCPPorts = [2291 80 443]; networking.firewall.allowedTCPPorts = [2291 80 443];
services.fail2ban.enable = true;
services.qemuGuest.enable = true; services.qemuGuest.enable = true;
services.forgejo = { services.forgejo = {
enable = true; enable = true;
@ -89,4 +90,5 @@
}; };
}; };
users.users.nginx.extraGroups = ["acme"]; users.users.nginx.extraGroups = ["acme"];
services.tailscale.enable = true;
} }

View file

@ -9,6 +9,7 @@
experimental-features = ["nix-command" "flakes"]; experimental-features = ["nix-command" "flakes"];
use-xdg-base-directories = true; use-xdg-base-directories = true;
}; };
nix.channel.enable = false;
environment.pathsToLink = ["/libexec"]; environment.pathsToLink = ["/libexec"];
environment.localBinInPath = true; environment.localBinInPath = true;

View file

@ -34,6 +34,7 @@ _exists zoxide && eval "$(zoxide init bash)"
# use starship prompt, unless in linux terminal # use starship prompt, unless in linux terminal
if [[ "$TERM" != "linux" ]]; then if [[ "$TERM" != "linux" ]]; then
[[ -v SSH_CONNECTION ]] && _set_title_suffix="@$(hostname)"
# suppress setting title for the commands run by nix-shell initalization # suppress setting title for the commands run by nix-shell initalization
[[ -v IN_NIX_SHELL ]] && _suppress_title=1 [[ -v IN_NIX_SHELL ]] && _suppress_title=1
function _set_win_title { function _set_win_title {
@ -48,7 +49,7 @@ if [[ "$TERM" != "linux" ]]; then
if declare -F _bashrc_main > /dev/null; then if declare -F _bashrc_main > /dev/null; then
return return
elif [[ "$@" != @("starship_precmd"|""|"__fzf_history__"|"fzf-file-widget"|"history -a"|"__zoxide_hook") ]]; then elif [[ "$@" != @("starship_precmd"|""|"__fzf_history__"|"fzf-file-widget"|"history -a"|"__zoxide_hook") ]]; then
printf "\e]0;%s | %s | %s\a" "$(dirs +0)" "$@" "$(date +"%H:%M:%S")" printf "\e]0;%s | %s | %s\a" "$(dirs +0)$_set_title_suffix" "$@" "$(date +"%H:%M:%S")"
fi fi
} }
# set window title after running command # set window title after running command