diff --git a/.chezmoiignore b/.chezmoiignore index cf28439..1753b05 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -9,7 +9,6 @@ commit-msg.txt scripts/* !scripts/sync-shortcuts txt/ -.gitconfig .imwheelrc .xinitrc .Xresources diff --git a/aliases/key_aliases.tmpl b/aliases/key_aliases.tmpl index 2baa753..b47ab39 100644 --- a/aliases/key_aliases.tmpl +++ b/aliases/key_aliases.tmpl @@ -52,13 +52,14 @@ mkpk "makepkg -sri" ex "chmod +x" # systemctl [[[ # -ctl "sudo systemctl" -ctle "sudo systemctl enable" -ctld "sudo systemctl disable" -ctla "sudo systemctl start" -ctls "sudo systemctl stop" -ctlt "sudo systemctl status" -ctlr "sudo systemctl restart" +ct "sudo systemctl" +cte "sudo systemctl enable" +ctd "sudo systemctl daemon-reload" +ctdi "sudo systemctl disable" +cta "sudo systemctl start" +cts "sudo systemctl stop" +ctt "sudo systemctl status" +# ctr "sudo systemctl restart" ctltd "sudo systemctl status dhcpcd" ctlas "sudo systemctl start sshd" @@ -210,9 +211,11 @@ xpk "pkg list-installed | awk -F/ '{print \$1}' > ~/{{ .chezmoi.os }}-config/txt # apt [[[ # -# apti "sudo apt install" -# aptr "sudo apt remove" -# aptu "sudo apt upgrade" +{{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }} +ap "apt install" +apr "apt remove" +apu "apt upgrade" +{{ end }} # ]]] apt # @@ -240,6 +243,10 @@ rdh "sudo killall dhcpcd && sudo dhcpcd" wgt "wget" +{{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }} +nt "nginx -t" +{{ end }} + # ]]] internet # id "identify" diff --git a/aliases/key_dirs.tmpl b/aliases/key_dirs.tmpl index 64795be..6137717 100644 --- a/aliases/key_dirs.tmpl +++ b/aliases/key_dirs.tmpl @@ -19,6 +19,11 @@ P ~/Pictures std ~/st tm /tmp +{{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }} +ng /etc/nginx/sites-available +sv /etc/systemd/system +{{ end }} + # ]]] sys # # cdn [[[ # diff --git a/aliases/key_files.tmpl b/aliases/key_files.tmpl index ef1a795..cb96201 100644 --- a/aliases/key_files.tmpl +++ b/aliases/key_files.tmpl @@ -22,6 +22,10 @@ xi ~/linux-config/dot_xinitrc y ~/.zshrc z ~/linux-config/aliases/zsh_aliases +{{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }} +ng /etc/nginx/nginx.conf +{{ end }} + # ]]] sys # # cdn [[[ # diff --git a/dot_config/fish/config.fish.tmpl b/dot_config/fish/config.fish.tmpl index 1669581..55e68e8 100755 --- a/dot_config/fish/config.fish.tmpl +++ b/dot_config/fish/config.fish.tmpl @@ -79,6 +79,7 @@ end abbr ab "abbr" abbr abe "abbr -e" +abbr hm "history merge" # abbr rfc "chezmoi apply && source ~/.config/fish/config.fish" abbr f. "cd .." abbr f.. "cd ../.." @@ -99,7 +100,9 @@ abbr cpc "copy cat" abbr cpe "copy echo" abbr cpp "copy echo (pwd)" abbr cff "create-fish-function" +abbr ctr "systemctl-restart" abbr def "define" +abbr ens "enable-site" abbr ev "evince-silent" # abbr fbg "find-bg" abbr fvft "find-vim-filetype" @@ -144,4 +147,4 @@ abbr jct "java-compile-test" # ]]] fxn abbr's # -abbr hm "cd $mfs_dir && hugo serve -D --disableFastRender" +abbr hum "cd $mfs_dir && hugo serve -D --disableFastRender" diff --git a/dot_config/fish/functions/enable-site.fish b/dot_config/fish/functions/enable-site.fish new file mode 100644 index 0000000..850b3d2 --- /dev/null +++ b/dot_config/fish/functions/enable-site.fish @@ -0,0 +1,3 @@ +function enable-site + ln -s (pwd)/$argv[1] ../sites-enabled +end diff --git a/dot_config/fish/functions/systemctl-restart.fish b/dot_config/fish/functions/systemctl-restart.fish new file mode 100644 index 0000000..7d310ea --- /dev/null +++ b/dot_config/fish/functions/systemctl-restart.fish @@ -0,0 +1,4 @@ +function systemctl-restart + sudo systemctl restart $argv[1] + and sudo systemctl status $argv[1] +end diff --git a/dot_gitconfig b/dot_gitconfig.tmpl similarity index 100% rename from dot_gitconfig rename to dot_gitconfig.tmpl