Compare commits
3 commits
dcc39189b7
...
4723d6b75b
Author | SHA1 | Date | |
---|---|---|---|
4723d6b75b | |||
5ef2f3b1c6 | |||
b8597f51a0 |
3 changed files with 16 additions and 2 deletions
|
@ -18,6 +18,7 @@
|
||||||
./roles/base.nix
|
./roles/base.nix
|
||||||
./roles/desktop.nix
|
./roles/desktop.nix
|
||||||
./roles/wireless.nix
|
./roles/wireless.nix
|
||||||
|
./roles/vpn.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
|
@ -14,6 +14,7 @@ in {
|
||||||
htop
|
htop
|
||||||
jq
|
jq
|
||||||
ncdu
|
ncdu
|
||||||
|
openssl
|
||||||
ripgrep
|
ripgrep
|
||||||
z-lua
|
z-lua
|
||||||
unstable.starship
|
unstable.starship
|
||||||
|
@ -38,15 +39,20 @@ in {
|
||||||
eval $(ssh-agent)
|
eval $(ssh-agent)
|
||||||
fi
|
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 ))}
|
len=''${1:-$(( $RANDOM % 24 + 8 ))}
|
||||||
tr -dc a-zA-Z0-9 < /dev/urandom | head -c $len
|
tr -dc a-zA-Z0-9 < /dev/urandom | head -c $len
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
cdg() {
|
cdg() {
|
||||||
gitroot=$(until [ -d .git ]; do [ "$PWD" == "/" ] && exit 1; cd ..; done; echo $PWD)
|
gitroot=$(until [ -d .git ]; do [ "$PWD" == "/" ] && exit 1; cd ..; done; echo $PWD)
|
||||||
if [ $? == 0 ]; then
|
if [ $? == 0 ]; then
|
||||||
|
precmd_user_func = "title"
|
||||||
cd $gitroot
|
cd $gitroot
|
||||||
else
|
else
|
||||||
echo "gitroot not found."
|
echo "gitroot not found."
|
||||||
|
|
7
roles/vpn.nix
Normal file
7
roles/vpn.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wireguard
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue