diff --git a/configuration.nix b/configuration.nix index ace14f5..c3aa043 100644 --- a/configuration.nix +++ b/configuration.nix @@ -18,6 +18,7 @@ ./roles/base.nix ./roles/desktop.nix ./roles/wireless.nix + ./roles/vpn.nix ]; boot.loader.systemd-boot.enable = true; diff --git a/roles/base.nix b/roles/base.nix index b44a0de..28846a8 100644 --- a/roles/base.nix +++ b/roles/base.nix @@ -14,6 +14,7 @@ in { htop jq ncdu + openssl ripgrep z-lua unstable.starship @@ -38,15 +39,20 @@ in { eval $(ssh-agent) fi - pw () { + set_win_title() { + echo -ne "\033]0;$USER@$HOSTNAME: $PWD\007" + } + starship_precmd_user_func=set_win_title + + pw() { len=''${1:-$(( $RANDOM % 24 + 8 ))} tr -dc a-zA-Z0-9 < /dev/urandom | head -c $len echo } - cdg() { gitroot=$(until [ -d .git ]; do [ "$PWD" == "/" ] && exit 1; cd ..; done; echo $PWD) if [ $? == 0 ]; then +precmd_user_func = "title" cd $gitroot else echo "gitroot not found." diff --git a/roles/vpn.nix b/roles/vpn.nix new file mode 100644 index 0000000..361713f --- /dev/null +++ b/roles/vpn.nix @@ -0,0 +1,7 @@ +{ config, lib, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + wireguard + ]; +}