From 3acc7f17094b115ccbb78c6d9b1495362c55f612 Mon Sep 17 00:00:00 2001 From: "dth@taiga.ai" Date: Tue, 5 Jul 2022 15:54:24 +0200 Subject: [PATCH 1/4] :memo: :art: add roadmap and improve install script --- ubuntu.md | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/ubuntu.md b/ubuntu.md index e266df3..3185f3a 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -1,24 +1,32 @@ -## apt packages +## Document Roadmap -All the startup installation stuff for ubuntu clients. +* ubunutu script should install all programs in one go (and not ask go Y every time) +* add necessary packages: +sudo add-apt-repository ppa:aslatter/ppa # for alacritty +* oh-my-zsh install +* ssh setup from vimwiki +* git clone dotfiles +* cd dotfiles and run makefile + * (make toplevel rules, i.e `setup_nerdfonts` is a sub of `setup_alacritty`) ``` -sudo apt install git # version control -# sudo apt install neovim # brew install nvim to get version 0.7 -sudo apt install librewolf # add librewolf repo first -sudo apt install qutebrowser # minimal vim-binding browser -sudo apt install gnome-tweaks # tool to remap caps to ctrl -sudo apt install alacritty # add alacritty repo first -sudo apt install tmux # terminal multiplexer -sudo apt install make # utility to maintain shell program groups -sudo apt install curl # file transfer helper -sudo apt install ffmpeg # audio/video converter -sudo apt install keepass2 # password manager -sudo apt install zsh # install oh-my-zsh to set zsh as default shell +## apt package - startup installation for ubuntu clients +sudo apt install git -y # version control +# sudo apt install neovim -y # brew install nvim to get version 0.7 +sudo apt install librewolf -y # add librewolf repo first +sudo apt install qutebrowser -y # minimal vim-binding browser +sudo apt install gnome-tweaks -y # tool to remap caps to ctrl +sudo apt install alacritty -y # add alacritty repo first +sudo apt install tmux -y # terminal multiplexer +sudo apt install make -y # utility to maintain shell program groups +sudo apt install curl -y # file transfer helper +sudo apt install ffmpeg -y # audio/video converter +sudo apt install keepass2 -y # password manager +sudo apt install zsh -y # install oh-my-zsh to set zsh as default shell # music setup -sudo apt install mpd -sudo apt install ncmpcpp +sudo apt install mpd -y # music player daemon +sudo apt install ncmpcpp -y # ncurses music player controller plus plus ``` ## Snap packages From 5cb6ad77b5b9af2ac89b63147a625fc3dfbfeba6 Mon Sep 17 00:00:00 2001 From: "dth@taiga.ai" Date: Tue, 5 Jul 2022 18:29:52 +0200 Subject: [PATCH 2/4] :memo: add dotfiles as vimwiki 4 --- .config/nvim/init.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 2a303cf..7948dae 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -62,7 +62,7 @@ let g:python3_host_prog = "$HOME/.venvs/nvim/bin/python" " VimWiki setup let g:vimwiki_sync_branch = "main" -let g:vimwiki_sync_commit_message = '$USER @ $HOST' +let g:vimwiki_sync_commit_message = 'vimwiki: $USER @ $HOST' let g:sync_taskwarrior = 0 let g:vimwiki_markdown_link_ext = 1 " explicitly add .md extension in vimwiki @@ -81,6 +81,11 @@ let wiki_3.path = '~/administration/' let wiki_3.syntax = 'markdown' let wiki_3.ext = 'md' +let wiki_3 = {} +let wiki_3.path = '~/dotfiles/' +let wiki_3.syntax = 'markdown' +let wiki_3.ext = 'md' + let g:vimwiki_list = [wiki_1, wiki_2, wiki_3] " Calendar setup From da3cf9daa6b32bb7efe5c5899490b99bd5193389 Mon Sep 17 00:00:00 2001 From: "dth@taiga.ai" Date: Tue, 5 Jul 2022 18:32:57 +0200 Subject: [PATCH 3/4] vimwiki: dth @ dth-ThinkPad-E560 --- ubuntu.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ubuntu.md b/ubuntu.md index 3185f3a..e439aca 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -2,15 +2,27 @@ * ubunutu script should install all programs in one go (and not ask go Y every time) * add necessary packages: -sudo add-apt-repository ppa:aslatter/ppa # for alacritty * oh-my-zsh install * ssh setup from vimwiki * git clone dotfiles * cd dotfiles and run makefile * (make toplevel rules, i.e `setup_nerdfonts` is a sub of `setup_alacritty`) +## Intro + +This post-install script is intended to be run directly after ubuntu 22.05 installion. +The scipt assumes device is encrypted and user account is protected. +With a strong passphrasses for both. +Open terminal, run one code snippet at the time and check that no errors occur: + +## apt package + +startup installation for ubuntu clients + ``` -## apt package - startup installation for ubuntu clients +# add external repos +sudo add-apt-repository ppa:aslatter/ppa # for alacritty + sudo apt install git -y # version control # sudo apt install neovim -y # brew install nvim to get version 0.7 sudo apt install librewolf -y # add librewolf repo first @@ -29,6 +41,52 @@ sudo apt install mpd -y # music player daemon sudo apt install ncmpcpp -y # ncurses music player controller plus plus ``` +Now **[install oh-my-zsh](https://ohmyz.sh/#install) and `reboot`**. + +## ssh setup + +> :construction: under construction +> +> +> no-prompt ssh keys +> https://stackoverflow.com/a/43235320 + + +### Setup ssh key for github + +The first ssh key is generated for github: + +``` +ssh-keygen -q -t ed25519 -N '' -f ~/.ssh/id_ed25519_github <</dev/null 2>&1 + +# older machines might not support ed25519, then use RSA with 4096 bit key +# ssh-keygen -q -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa_github <</dev/null 2>&1 +``` + +Log in to github. +Go to [github.com/settings/ssh/new](https://github.com/settings/ssh/new). +Enter a title format in the format `2022-homeserver`. +Enter the key returned by `cat ~/.ssh/id_*_github.pub`. +Now you can clone your private repos and make changes to your public repos. + + +### Setup ssh key for connecting to other servers + +This next ssh key is generated for github: + +``` +ssh-keygen -q -t ed25519 -N '' -f ~/.ssh/id_ed25519_mynetwork <</dev/null 2>&1 + +# older machines might not support ed25519, then use RSA with 4096 bit key +# ssh-keygen -q -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa_mynetwork <</dev/null 2>&1 +``` + +The public ssh key is in `~/.ssh/id_*_mynetwork.pub`. +Copy the public key to machines which you want to access with this machine. +Inversely, if you want other machines to ssh to this machine, +copy their public keys to this machine. + + ## Snap packages ``` snap install codium --classic From 0139db66ec338e937b5434745447e1ba5383d63f Mon Sep 17 00:00:00 2001 From: "dth@taiga.ai" Date: Tue, 5 Jul 2022 18:58:07 +0200 Subject: [PATCH 4/4] vimwiki: dth @ dth-ThinkPad-E560 --- .config/nvim/init.vim | 18 +++++++++++++----- README.md | 6 +++++- index.md | 1 + ubuntu.md | 13 +++++++++++-- 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 index.md diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 7948dae..719480a 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -67,26 +67,34 @@ let g:sync_taskwarrior = 0 let g:vimwiki_markdown_link_ext = 1 " explicitly add .md extension in vimwiki let wiki_1 = {} +let wiki_1.name = 'vimwiki_private' let wiki_1.path = '~/.local/share/nvim/vimwiki/' let wiki_1.syntax = 'markdown' let wiki_1.ext = 'md' +let wiki_1.automatic_nested_syntaxes = 1 let wiki_2 = {} +let wiki_2.name = 'methodology_public' let wiki_2.path = '~/methodology/' let wiki_2.syntax = 'markdown' let wiki_2.ext = 'md' +let wiki_2.automatic_nested_syntaxes = 1 let wiki_3 = {} +let wiki_3.name = 'taiga_admin_private' let wiki_3.path = '~/administration/' let wiki_3.syntax = 'markdown' let wiki_3.ext = 'md' +let wiki_3.automatic_nested_syntaxes = 1 -let wiki_3 = {} -let wiki_3.path = '~/dotfiles/' -let wiki_3.syntax = 'markdown' -let wiki_3.ext = 'md' +let wiki_4 = {} +let wiki_4.name = 'dotfiles_public' +let wiki_4.path = '~/dotfiles/' +let wiki_4.syntax = 'markdown' +let wiki_4.ext = 'md' +let wiki_4.automatic_nested_syntaxes = 1 -let g:vimwiki_list = [wiki_1, wiki_2, wiki_3] +let g:vimwiki_list = [wiki_1, wiki_2, wiki_3, wiki_4] " Calendar setup let g:calendar_first_day = 'monday' " set monday as first day of week diff --git a/README.md b/README.md index 4f265e1..6ec52e1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # dotfiles This repo is an extension of [dannydannydanny/methodology](https://github.com/DannyDannyDanny/methodology/) +The central part of this repo is [ubuntu](ubuntu.md) ## Roadmap: @@ -17,5 +18,8 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da * [ ] make-rule for setting up `$HOME/.venvs/nvim/bin/python` * [ ] make-rules for getting nvim checkhealth up to speed * [ ] music config: - * mpd, mpc, ncmpcpp ([Mac guide](https://killtheyak.com/install-mpd-mpc-ncmpcpp/), [config guide for mac](https://computingforgeeks.com/install-configure-mpd-ncmpcpp-macos/)) + * mpd, mpc, ncmpcpp + * [Mac guide](https://killtheyak.com/install-mpd-mpc-ncmpcpp/) + * [config guide for mac](https://computingforgeeks.com/install-configure-mpd-ncmpcpp-macos/) * test on new machine with music dir + diff --git a/index.md b/index.md new file mode 100644 index 0000000..5cf5921 --- /dev/null +++ b/index.md @@ -0,0 +1 @@ +* [README.md](README.md.md) diff --git a/ubuntu.md b/ubuntu.md index e439aca..9deaf90 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -1,7 +1,5 @@ ## Document Roadmap -* ubunutu script should install all programs in one go (and not ask go Y every time) -* add necessary packages: * oh-my-zsh install * ssh setup from vimwiki * git clone dotfiles @@ -86,6 +84,17 @@ Copy the public key to machines which you want to access with this machine. Inversely, if you want other machines to ssh to this machine, copy their public keys to this machine. +#### ssh resources +* [Digital Ocean ssh essentials](https://www.digitalocean.com/community/tutorials/ssh-essentials-working-with-ssh-servers-clients-and-keys) + +#### server-side setup checklist +* setup locales (LC_LANGUAGE, LC_ALL) +* install openssh-server +* enable ssh service on startup +* copy workstation public key to server +* ssh via key (i.e no password) +* disable password authentication + ## Snap packages ```