# Common OS Setup

##### Setup KeepassXC

- Install: [https://keepassxc.org/](https://keepassxc.org/)
    - <p class="callout info">Do not install the flatpak, it will not be possible to connect browsers to the databasee</p>
- Open database
- Configure the usual

##### Setup Firefox

- Install: [https://www.mozilla.org/en-US/firefox/download/thanks/](https://www.mozilla.org/en-US/firefox/download/thanks/)
- Log into account
- Configure the usual
- Setup extensions 
    - Log into SimpleLogin
    - Change redirects 
        - ```
            {
                "createdBy": "Redirector v3.5.3",
                "createdAt": "2024-07-25T23:26:55.311Z",
                "redirects": [
                    {
                        "description": "Reddit",
                        "exampleUrl": "https://reddit.com/r/all",
                        "exampleResult": "https://tasks.citrus.farm",
                        "error": null,
                        "includePattern": "(.*)reddit.com/r/(all|popular)",
                        "excludePattern": "",
                        "patternDesc": "Reddit to Camp",
                        "redirectUrl": "https://camp.citrus.garden",
                        "patternType": "R",
                        "processMatches": "noProcessing",
                        "disabled": false,
                        "grouped": false,
                        "appliesTo": [
                            "main_frame"
                        ]
                    },
                    {
                        "description": "New to old reddit",
                        "exampleUrl": "https://www.reddit.com/r/all",
                        "exampleResult": "https://old.reddit.com/r/all",
                        "error": null,
                        "includePattern": "(.*)www.reddit.com(.*)",
                        "excludePattern": "",
                        "patternDesc": "New to old reddit",
                        "redirectUrl": "https://old.reddit.com$2",
                        "patternType": "R",
                        "processMatches": "noProcessing",
                        "disabled": false,
                        "grouped": false,
                        "appliesTo": [
                            "main_frame"
                        ]
                    }
                ]
            }
            ```

##### Setup terminal

- Install: [https://sw.kovidgoyal.net/kitty/](https://sw.kovidgoyal.net/kitty/)
    - ```
          curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
        
        ```
- Setup Dracula theme: [https://draculatheme.com/kitty](https://draculatheme.com/kitty)
    - ```
          mkdir ~/.config/kitty
          cd ~/Downloads && wget https://github.com/dracula/kitty/archive/master.zip
          cp dracula.conf diff.conf ~/.config/kitty/
          echo "include dracula.conf" >> ~/.config/kitty/kitty.conf
        
        ```
- Configure the usual

##### Install vim

- Use whatever package manager to install

##### Setup git

- Install using whatever package manager
- Setup SSH key
- Setup the config 
    - ```
          user.email citrusfarm@pm.me
          user.name isa
          init.defaultbranch main
          credential.helper store
        
        ```

##### Setup Fish

- Install: [https://fishshell.com/](https://fishshell.com/)
    - Usually just install with whatever package manager
- Setup Dracula theme: [https://draculatheme.com/fish](https://draculatheme.com/fish)
    - Install with OMF 
        - Install: [https://github.com/oh-my-fish/oh-my-fish](https://github.com/oh-my-fish/oh-my-fish)
        - ```
              curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
            
            ```
    - Install manually 
        - ```
              wget https://github.com/dracula/fish/archive/master.zip
              mkdir ~/.config/fish/themes/
              cd master
              cp themes/Dracula\ Official.theme ~/.config/fish/themes/
            
            ```
    - Add the following to `~/.config/fish/config.fish`
        - - ```
                fish_config theme choose "Dracula Official"
                ```

##### Setup tmux

- Install: [https://github.com/tmux/tmux/wiki/Installing](https://github.com/tmux/tmux/wiki/Installing)
    - Usually just install with whatever package manager
- Setup Dracula theme: [https://draculatheme.com/tmux](https://draculatheme.com/tmux)
    - Install tpm: [https://github.com/tmux-plugins/tpm](https://github.com/tmux-plugins/tpm)
        - ```
            git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
            ```
        - Add to `~/.tmux.conf`
            - ```
                  # List of plugins
                  set -g @plugin 'tmux-plugins/tpm'
                  set -g @plugin 'tmux-plugins/tmux-sensible'
                
                  # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
                  run '~/.tmux/plugins/tpm/tpm'
                
                ```
        - Reload tmux 
            - ```
                  # type this in terminal if tmux is already running
                  tmux source ~/.tmux.conf
                
                ```
    - Add Dracula plugin 
        - ```
              set -g @plugin 'dracula/tmux'
            
            ```
        - Press `prefix+I` to fetch plugin
- Setup config 
    - Add the following to ~/.tmux.conf 
        - ```
              bind - split-window -v
              bind - split-window -h
            
              unbind '"'
              unbind %
            
              set -g default-command /usr/bin/fish
              set -g default-shell /usr/bin/fish
            
              set -g @plugin 'tmux-plugins/tpm'
              set -g @plugin 'tmux-plugins/tmux-sensible'
            
              set -g @plugin 'dracula/tmux'
              set -g @dracula-show-powerline true
              set -g @dracula-plugins "cpu-usage ram-usage battery time"
              set -g @dracula-refresh-rate 1
              set -g @dracula-military-time true
              set -g @dracula-time-format "%Y-%m-%d %H:%M:%S"
            
              run '~/.tmux/plugins/tpm/tpm'
            
            
            ```

##### Setup SSH connections

- [Create new SSH key and add it to ssh-agent](https://log.citrus.garden/books/linux/page/create-new-ssh-key-and-add-it-to-ssh-agent "Create new SSH key and add it to ssh-agent")
- [Enable new SSH key for login](https://log.citrus.garden/books/linux/page/enable-new-ssh-key-for-login "Enable new SSH key for login")
- Upload SSH keys to codeberg, gitlab, and github

##### Setup ActivityWatch

<p class="callout danger">ActivityWatch currently only works with X11. There is a WIP for Wayland but it is not fully tested yet.</p>

- Install: [https://activitywatch.net/](https://activitywatch.net/)
- Unzip to `/usr/bin/`
- Add `aw-qt` as an alias to `~/.config/fish/config.fish`
    - ```
        alias aw-qt="/usr/bin/activitywatch/aw-qt"
        
        ```
- Make the following executeable: 
    - ```
        sudo chmod +x /usr/bin/activitywatch/aw-qt.desktop
        sudo chmod +x /usr/bin/activitywatch/aw-server-rust/aw-server.service
        
        ```

##### Install NoMachine

- Install: [https://downloads.nomachine.com/linux/?id=1](https://downloads.nomachine.com/linux/?id=1)

##### Setup Tailscale

- Install: [https://tailscale.com/download](https://tailscale.com/download)
    - ```
        curl -fsSL https://tailscale.com/install.sh | sh
        
        ```

##### Setup Syncthing

- Install Syncthing: [https://syncthing.net/downloads/](https://syncthing.net/downloads/)
    - <p class="callout info">Try installing with package manager first</p>

##### Setup Nextcloud

- Install: [https://nextcloud.com/install/](https://nextcloud.com/install/)
- Copy app image to Programs 
    - ```
        mkdir ~/Programs
        mv ~/Downloads/<nextcloud> ~/Programs/nextcloud.AppImage
        sudo chmod +x ~/Programs/nextcloud.AppImage
        sudo ln -s /home/<user>/Programs/nextcloud.AppImage /usr/bin/nextcloud
        ```
- Run and login

##### Setup AirVPN

- Install: [https://airvpn.org/linux/suite/](https://airvpn.org/linux/suite/)

##### Setup Docker

- Install Docker engine: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)

##### Setup calendars

- Install GNOME calendar: [https://flathub.org/apps/org.gnome.Calendar](https://flathub.org/apps/org.gnome.Calendar)
    - ```
          flatpak install flathub org.gnome.Calendar
        
        ```
    - [Add to fish path](https://log.citrus.garden/books/solved-issues/page/add-to-path-in-fish "Add to PATH in fish") so that it's accessible via dmenu 
        - ```
              fish_add_path -p ~/.local/share/flatpak/exports/bin
              fish_add_path -p /var/lib/flatpak/exports/bin to
            
            ```
- Install evolution: [https://flathub.org/apps/org.gnome.Evolution](https://flathub.org/apps/org.gnome.Evolution)
    - ```
          flatpak install flathub org.gnome.Evolution
        
        ```
- Add CalDAV calendars
- Configure the usual