Browse Source

Server root config

red-hat-laptop
Kevin Mok 5 years ago
parent
commit
92aa2bd6f5
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 1
      .chezmoiignore
  2. 27
      aliases/key_aliases.tmpl
  3. 5
      aliases/key_dirs.tmpl
  4. 4
      aliases/key_files.tmpl
  5. 5
      dot_config/fish/config.fish.tmpl
  6. 3
      dot_config/fish/functions/enable-site.fish
  7. 4
      dot_config/fish/functions/systemctl-restart.fish
  8. 0
      dot_gitconfig.tmpl

1
.chezmoiignore

@ -9,7 +9,6 @@ commit-msg.txt
scripts/*
!scripts/sync-shortcuts
txt/
.gitconfig
.imwheelrc
.xinitrc
.Xresources

27
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"

5
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 [[[ #

4
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 [[[ #

5
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"

3
dot_config/fish/functions/enable-site.fish

@ -0,0 +1,3 @@
function enable-site
ln -s (pwd)/$argv[1] ../sites-enabled
end

4
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

0
dot_gitconfig → dot_gitconfig.tmpl

Loading…
Cancel
Save