1. qubes-dom0-update

Fedora Template VM##

  1. sudo dnf update

For general coding:

sudo dnf install ruby ruby-devel fish vim git mercurial svn gcc gcc-c++ keychain tor torbrowser-launcher rfkill lshw
sudo lchsh user
    /usr/bin/fish

Inotify increase for Dropbox and IDEs

  1. Setup rc.local to tell inotify to have more watches

     sudo vim /rw/config/rc.local
         sysctl -w fs.inotify.max_user_watches=1000000
     sudo chmod a+x /rw/config/rc.local
    
  2. run or reboot

Webbrowser (Firefox or Tor Browser) in VMs

  1. ublock-origin
  2. privacy-badger
  3. HTTPS everywhere (already included in Tor Browser)
  4. Switch search to DuckDuckGo or Disconnect
  5. Set Security/Remember Passwords to false

Go Development VM

  1. Setup keychain

    ~/.config/fish/config.fish

     if status --is-interactive
          keychain --eval --quiet -Q id_rsa
     end
    
  2. Get go from golang.org and place it in ~/go

  3. Set shell paths in ~/.config/fish/config.fish

     set -x GOROOT /home/user/go
     set -x GOPATH /home/user/src/go
     set -x fish_user_paths  /home/user/go/bin /home/user/src/go/bin /home/user/bin
    

Intellij For Go setup

  1. Install Go lang plugin

Eclipse for Go setup

  1. Get eclipse (and add ~ /home/user/eclipse/java-mars/eclipse to the fish path)
  2. Install eclipse plugins for:
    1. goeclipse
    2. WTP (web tools platform)
    3. egit
    4. TM Terminal
  3. Configure goeclipse and have it run commands to get oracle and gocode

Android Development Setup

  1. Fedora Template VM: Install Java

     $ sudo dnf install java-1.8.0-openjdk java-1.8.0-openjdk-devel
    
  2. Setup writable temp directory for java with room for java compiling and Android Studio

    $ sudo mkdir /rw/java-tmp
    $ sudo chown user:user /rw/java-tmp
    
  3. ~/.config/fish/config.fish

    set -x JAVA_OPTIONS -Djava.io.tmpdir=/rw/java-tmp
    set -x ANDROID_HOME /home/user/Android/Sdk
    
  4. Setup udev to make android usb devices writable

     cd /rw/config
     sudo vim 99-android-udev.rules
         SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="user"
     sudo vim rc.local
         cp /rw/config/99-android-udev.rules /etc/udev/rules.d
         udevadm control --reload-rules
     sudo chmod a+x rc.local
    

    Remembering to change the ATTR{idVendor} from “18d1” (google phone id) to what ever phone you have, or adding more rules for each phone

  5. Install Android Studio

Markdown and Jekyll website development

  1. Fedora Template VM

    $ sudo dnf install jekyll rubygems-rb-inotify retext perl-Digest-MD5 aspell aspell-en
    

Personal VM encryption

  1. Fedora Template VM

     $ sudo dnf install libXScrnSaver
    
  2. Download and install keybase, import private key safely

Postgresql in VMs

Sourced from bowabos.blogspot.co.uk/2013/12/how-to-set-up-jira-and-confluence-on.html

Local backup references/qubes-postgresql/bowabos.blogspot.co.uk/2013/12/how-to-set-up-jira-and-confluence-on.html

Fedora Template VM: Install postgres

 $ sudo dnf install postgresql postgresql-contrib postgresql-server

Create persistent storage for Postgresql

cd /rw
sudo mkdir -p var/pgsql/data
sudo chown postgres:postgres var/pgsql/data
sudo chmod 700 var/pgsql/data
sudo mkdir -p var/pgsql/backups
sudo chown postgres:postgres var/pgsql/backups
sudo chmod 700 var/pgsql/backups

Initializing the database

sudo su
rm -rf /var/lib/pgsql
ln -s /rw/var/pgsql /var/lib/pgsql
postgresql-setup initdb
exit

Configuring the database cluster for local app access

sudo su - postgres
vi /var/lib/pgsql/data/pg_hba.conf
    host    all     all     127.0.0.1/32    md5
    host    all     all     ::1/128         md5

Configuring a database database (example transmet)

sudo systemctl start postgresql
sudo -s -H -u postgres
/usr/bin/createuser -S -P -E transmet
/usr/bin/createdb --owner transmet --encoding utf8 transmet

Preparing for a reboot

sudo vi config/rc.local
    #!/bin/bash
    rm -rf /var/lib/pgsql
    ln -s /rw/var/pgsql /var/lib/pgsql
    /usr/bin/systemctl enable postgresql &
    /usr/bin/systemctl start postgresql &
sudo chmod u+x config/rc.local