Move ssh-key to autoinstall
This commit is contained in:
parent
977324b836
commit
6f9f80309e
4 changed files with 23 additions and 3 deletions
|
@ -56,6 +56,14 @@ _autoinstall_graphical () {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_autoinstall_ssh () {
|
||||||
|
_autoinstall_text \
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCkmWZmum4cVeDy5+9N1HdUzfnjEHSJ900ucD8F0wAy4MV1cdPYnZ4u5PFv5XMfmvA9SJ+VFsr0lhYlr+GQBG9aCCAdMJVVmEz3SccT6dp6ZYywT158RNshzfCe9ylWKK80+W7XnDXhdkec7aK+BQn5wOER3A3mUqRR0JDXWga9jyakH1K6OwXmQOO419bJWs2uCT1ZEgndHxKJEt2pEvoSz7z8p1SS2zyro+R3YtvL9WiDo3+0yPFYficNDr7s39yF5IJE+KTqAlCn5R2+kJ54lRmzB8oNS2jGwK2Q6wtph4AmfnlJTMODG2U2RjUltH2MIDXIYe2epATWL8qhkI4LTr38C7QR3DeJQsel/yTWdYqGakvU6Ge/xkbsaWOrSDTV3bPgKHzlL+dIKaGpV+5usZN4fpOLOb/nmYy3ekLpobzxza7rBRT2CxXS72DoPFaRE1ye7SxhcsLBNwre9YQFE4VvUZwJYkWz2V7eqGrk8VYnmQmT/bnUnMnVwMpeDc7pFKAFndIUxifoOj77c98Tdy3ncdS7SOd7+zRbLG+7k0UU1k89o1+tfREAddUJYR4RvB6g0kCyjpwOf1Pt4zhJR3y/zpsCCc5UnzK9X2kEo/8TSyvTr+GBiFVp5yLYgwCPJSNna33YX7+c3oLRM1QGgtqZk9qnGX9hgP8qpF8Akw== openpgp:0xAB920993" \
|
||||||
|
"$HOME/.ssh/authorized_keys"
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
_autoinstall_all () {
|
_autoinstall_all () {
|
||||||
_autoinstall_base
|
_autoinstall_base
|
||||||
_autoinstall_graphical
|
_autoinstall_graphical
|
||||||
|
@ -87,6 +95,19 @@ _autoinstall_file () {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_autoinstall_text() {
|
||||||
|
if [ ! -f "$2" ]
|
||||||
|
then
|
||||||
|
echo "Installing text to $2"
|
||||||
|
file_path=$(dirname "$2")
|
||||||
|
mkdir -p "$file_path"
|
||||||
|
cd "$file_path" || exit
|
||||||
|
echo "$1" > "$2"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
_autoinstall_exe () {
|
_autoinstall_exe () {
|
||||||
_autoinstall_file "$1" "$2" && chmod +x "$2"
|
_autoinstall_file "$1" "$2" && chmod +x "$2"
|
||||||
}
|
}
|
||||||
|
@ -118,6 +139,7 @@ action="${1:-base}"
|
||||||
case $action in
|
case $action in
|
||||||
all) _autoinstall_all ;;
|
all) _autoinstall_all ;;
|
||||||
base) _autoinstall_base ;;
|
base) _autoinstall_base ;;
|
||||||
|
ssh) _autoinstall_ssh ;;
|
||||||
graphical) _autoinstall_graphical ;;
|
graphical) _autoinstall_graphical ;;
|
||||||
git) _autoinstall_git "$2" "$3" ;;
|
git) _autoinstall_git "$2" "$3" ;;
|
||||||
file) _autoinstall_file "$2" "$3" ;;
|
file) _autoinstall_file "$2" "$3" ;;
|
||||||
|
|
|
@ -35,6 +35,7 @@ export MOAR="--style=dracula"
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
|
||||||
export NIXPKGS_ALLOW_UNFREE=1
|
export NIXPKGS_ALLOW_UNFREE=1
|
||||||
|
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npmrc"
|
||||||
|
|
||||||
export PASSWORD_STORE_GENERATED_LENGTH='64'
|
export PASSWORD_STORE_GENERATED_LENGTH='64'
|
||||||
export PS1='\$ '
|
export PS1='\$ '
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
*.git_hidden.*
|
*.git_hidden.*
|
||||||
|
|
||||||
# Vim Stuff
|
# Vim Stuff
|
||||||
.syntastic_*_config
|
|
||||||
.breakpoints
|
|
||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCkmWZmum4cVeDy5+9N1HdUzfnjEHSJ900ucD8F0wAy4MV1cdPYnZ4u5PFv5XMfmvA9SJ+VFsr0lhYlr+GQBG9aCCAdMJVVmEz3SccT6dp6ZYywT158RNshzfCe9ylWKK80+W7XnDXhdkec7aK+BQn5wOER3A3mUqRR0JDXWga9jyakH1K6OwXmQOO419bJWs2uCT1ZEgndHxKJEt2pEvoSz7z8p1SS2zyro+R3YtvL9WiDo3+0yPFYficNDr7s39yF5IJE+KTqAlCn5R2+kJ54lRmzB8oNS2jGwK2Q6wtph4AmfnlJTMODG2U2RjUltH2MIDXIYe2epATWL8qhkI4LTr38C7QR3DeJQsel/yTWdYqGakvU6Ge/xkbsaWOrSDTV3bPgKHzlL+dIKaGpV+5usZN4fpOLOb/nmYy3ekLpobzxza7rBRT2CxXS72DoPFaRE1ye7SxhcsLBNwre9YQFE4VvUZwJYkWz2V7eqGrk8VYnmQmT/bnUnMnVwMpeDc7pFKAFndIUxifoOj77c98Tdy3ncdS7SOd7+zRbLG+7k0UU1k89o1+tfREAddUJYR4RvB6g0kCyjpwOf1Pt4zhJR3y/zpsCCc5UnzK9X2kEo/8TSyvTr+GBiFVp5yLYgwCPJSNna33YX7+c3oLRM1QGgtqZk9qnGX9hgP8qpF8Akw== openpgp:0xAB920993
|
|
Loading…
Reference in a new issue