Set up a new linux machine from a clean install using Ansible and Stow.
This abuses Ansible intended purpose by running a playbook locally.
It is run by cloning to ~/.dotfiles
(any other directory should work) then run scripts and ansible-playbooks using the provided Makefile.
The exact roles being run can be configured per host using the hostname. The roles are associated to each host in the root playbook file site.yml
.
Only the host that matches the local hostname are ran. This is the case because the inventory file hosts
is generated during bootstrap, listing only the name of the current host. If you're configuring a new host you'll have to add a new entry to site.yml
.
Under each entry in the roles
directory, you'll find standard sub-directories such as files
, tasks
, or meta
. You'll also find the non-standard stow
sub-directory, which contains files to be symlinked (usually from user's home). This allows us to edit the files in their normal placement in the file system while automatically updating the ~/.dotfiles
repo. These changes can then be committed.
- Click on the upper right menu.
- Click on "Wired unmanaged" > "Wired Settings"
- It will open a window. you will need to click on the "gear" icon for network proxy.
- Click on automatic and write the following url
http://webproxy.deutsche-boerse.de:8080
To check that it works by opening firefox and login to your github account.
Setup the proxy for curl copy paste this to the terminal.
export https_proxy=http://webproxy.deutsche-boerse.de:8080
Open this link to get an authenticated url of the init script and copy it. click me
curl <replace with the link here> | bash
The script with generate a ssh key for you, open github so you register the key and clone this repo to continue the installation of the whole environment.
vi ~/.dotfiles/site.yml
touch "$HOME/.dotfiles/roles/common/stow/bashrc/.bashrc.hosts.d/$(hostname).bashrc"
git commit -Am "Adding host $(hostname)"
cd ~/.dotfiles
make install
make sync
- Settings > Region & Language > Input Sources > + > English (US) > English (US Int AltGr, Custom by Rod)
- This seems to require a restart
~/.emacs-profiles/doom-emacs/bin/doom install
~/.emacs-profiles/doom-emacs/bin/doom sync
(doom
should be in the PATH by this point so you can also run it directly if
you open a new terminal).
/opt/jetbrains-toolbox-1.21.9712/jetbrains-toolbox
After the first run the Jetbrains Toolbox desktop link will be registered. Use the GUI to install IntelliJ IDEA.
- Open the toolbox and click on the "gear icon" > "proxy" > HTTP
Address: webproxy.deutsche-boerse.de
Port: 8080
-
Click to install IDEA Ultimate
-
Click to open IDEA and register with license server**
https://jetbrains.deutsche-boerse.de
-
**If you have problems try by disabling the proxy from the toolbox.
-
Once IDEA is registered in the Welcome panel go to "Customize">"All Settings">"Appearance & Behavior">"Sytem Settings">"HTTP Proxy"
- Manual HTTP Proxy:
- host: webproxy.deutsche-boerse.de
- port: 8080
- No proxy for: *.deutsche-boerse.de
- Manual HTTP Proxy:
- Open DBeaver
- Click on
window
tab - Click on
Preferences
- Search for
proxy
- You should be seeing two options:
- Network Connections:
- Double click on HTTP in proxy entries
- host: webproxy.deutsche-bourse.de
- port: 8080
- Do the same for HTTPS
- host: webproxy.deutsche-bourse.de
- port: 8080
- Double click on HTTP in proxy entries
- Drivers:
- host: webproxy.deutsche-bourse.de
- port: 8080
- Network Connections:
- Click on
Apply and close
- Close the application completely
- Reopen DBeaver
- You should now be able to connect to Microsoft SQL Server !
11. [Optional] Pull current keyboard shortcuts, commit and check other machine configs for inspiration
cd ~/.dotfiles/keybindings
./pull
vim "media-keys/$(hostname).dconf
This is too personal machine-dependent to fully automate at this point. So these scripts just make it easy to track your changes in different machines.
- The keylayout setup script removes the comments from
evdev.xml
. This could be fixed by using lxml or injecting the comments. - Only works for Ubuntu and Pop!_OS right now
Create a separate git root to keep it out of Dropbox:
mkdir ~/.gitroots
git clone --separate-git-dir="/home/rodelrod/.gitroots/org.git" git@gitlab.com:rodelrod/org.git ~/Dropbox/Org
cd keybindings && ./pull && git diff
Useful after moving packages to a different role due to a refactoring.
cd roles/{ROLE}/stow
stow -D -t ~ {PACKAGE}
git submodule init {PACKAGE}
git submodule update --merge
or maybe
- `git submodule update --init --recursive