Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ You can use tags to run specific parts of the playbook using the `--tags` flag.
| `eget` | Installs `eget` and configured binary packages. |
| `install` | Installs the list of packages defined in `apt.install` and `eget` packages. |
| `nvidia` | Handles NVIDIA/CUDA related installations. |
| `protonvpn` | Installs Proton VPN app from the official Proton APT repository. |
| `upgrade` | Performs `apt upgrade` and updates `eget` packages. |
| `vpn` | Runs VPN related tasks. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (typo): Consider hyphenating “VPN related” to “VPN-related”.

In this row, update the description to “Runs VPN-related tasks.” to match standard hyphenation and keep the table wording consistent.

Suggested change
| `vpn` | Runs VPN related tasks. |
| `vpn` | Runs VPN-related tasks. |

| `vscode` | Installs Visual Studio Code. |

Example:
Expand All @@ -55,8 +57,9 @@ The `setup-linux.yml` playbook performs the following operations:
3. **CUDA Toolkit**: Configures and installs NVIDIA CUDA drivers and toolkit.
4. **VS Code**: Adds the Microsoft repository and installs Visual Studio Code.
5. **Brave Browser**: Adds the Brave repository and installs the browser.
6. **Eget**: Installs the `eget` binary and a set of useful CLI tools to `~/.local/bin`.
7. **Dotfiles**: Symlinks configuration files from this repository into your `$HOME`.
6. **Proton VPN**: Adds the official Proton VPN repository and installs the GUI app.
7. **Eget**: Installs the `eget` binary and a set of useful CLI tools to `~/.local/bin`.
8. **Dotfiles**: Symlinks configuration files from this repository into your `$HOME`.

### Note on Dotfiles Conflicts

Expand Down
6 changes: 6 additions & 0 deletions .ansible/playbooks/setup-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
become: true
tags: [apt, brave]

- name: Import Proton VPN installation tasks
ansible.builtin.import_tasks: tasks/apt-release-protonvpn.yml
when: (apt.releases.protonvpn | default(false)) if apt.releases is defined else false
become: true
tags: [apt, protonvpn, vpn]
Comment on lines +48 to +52

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Simplify the when expression to avoid the ternary and potential edge cases when apt.releases is missing or falsy.

The current when clause uses a Jinja ternary:

(apt.releases.protonvpn | default(false)) if apt.releases is defined else false

A clearer and more idiomatic alternative is:

when: apt.releases is defined and (apt.releases.protonvpn | default(false))

This relies on short-circuiting, keeps the logic in standard when form, and is easier to read and maintain.

Suggested change
- name: Import Proton VPN installation tasks
ansible.builtin.import_tasks: tasks/apt-release-protonvpn.yml
when: (apt.releases.protonvpn | default(false)) if apt.releases is defined else false
become: true
tags: [apt, protonvpn, vpn]
- name: Import Proton VPN installation tasks
ansible.builtin.import_tasks: tasks/apt-release-protonvpn.yml
when: apt.releases is defined and (apt.releases.protonvpn | default(false))
become: true
tags: [apt, protonvpn, vpn]


- name: Import eget installation tasks
ansible.builtin.import_tasks: tasks/eget.yml
when: eget | default(false) | bool
Expand Down
17 changes: 17 additions & 0 deletions .ansible/playbooks/tasks/apt-release-protonvpn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: Download Proton VPN stable release package
ansible.builtin.get_url:
url: https://repo.protonvpn.com/debian/dists/stable/main/binary-all/protonvpn-stable-release_1.0.8_all.deb
dest: /tmp/protonvpn-stable-release_1.0.8_all.deb
Comment on lines +2 to +5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider parameterizing the Proton VPN release version and download path for maintainability.

Both the URL and dest hard-code 1.0.8, so each new release will require updating this task in multiple places. Defining a variable such as protonvpn_release_version: '1.0.8' and reusing it in both fields would simplify upgrades and reduce mistakes. You could also consider making the download directory configurable to stay consistent with other APT bootstrap tasks.

mode: '0644'

- name: Install Proton VPN repository package
ansible.builtin.apt:
deb: /tmp/protonvpn-stable-release_1.0.8_all.deb
state: present

- name: Install Proton VPN app
ansible.builtin.apt:
name: proton-vpn-gnome-desktop
state: present
update_cache: true
3 changes: 3 additions & 0 deletions .ansible/playbooks/tasks/eget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@
jq: >-
-a {{ 'linux64' if eget_arch == 'x86_64' else 'linux-arm64' if eget_arch == 'arm64' else 'linux-arm' }}
jqlang/jq
oyster: "--tag pearl-wallet-v1.0.0 -a .tar.gz --file oyster --to oyster pearl-research-labs/pearl"
pandoc: "-a linux-{{ 'amd64' if eget_arch == 'x86_64' else 'arm64' }}.tar.gz jgm/pandoc"
pearld: "--tag pearl-wallet-v1.0.0 -a .tar.gz --file pearld --to pearld pearl-research-labs/pearl"
prlctl: "--tag pearl-wallet-v1.0.0 -a .tar.gz --file prlctl --to prlctl pearl-research-labs/pearl"
Comment on lines +86 to +89

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Avoid repeating the Pearl wallet version string across multiple eget entries.

oyster, pearld, and prlctl all hardcode --tag pearl-wallet-v1.0.0, duplicating the version and increasing maintenance overhead. Please define a single variable (e.g. pearl_wallet_version) and interpolate it into these entries to keep the Pearl tooling version consistent and easier to update.

Suggested implementation:

      oyster: "--tag {{ pearl_wallet_version }} -a .tar.gz --file oyster --to oyster pearl-research-labs/pearl"

      pearld: "--tag {{ pearl_wallet_version }} -a .tar.gz --file pearld --to pearld pearl-research-labs/pearl"

      prlctl: "--tag {{ pearl_wallet_version }} -a .tar.gz --file prlctl --to prlctl pearl-research-labs/pearl"

Define pearl_wallet_version once in an appropriate variables scope so it’s available to this task, for example:

  • In the same play under vars::
    pearl_wallet_version: pearl-wallet-v1.0.0
  • Or in a group/host var file used by this play.

Ensure the variable name matches exactly (pearl_wallet_version) and that Jinja2 interpolation is enabled for this YAML section (which is standard for Ansible task files).

rg: "-a {{ eget_plain_arch }}-unknown-linux-musl.tar.gz BurntSushi/ripgrep"
tealdeer: "-a tealdeer-linux-{{ eget_arch }}-musl -a ^sha256 dbrgn/tealdeer"
vale: "-a {{ 'Linux_64-bit' if eget_arch == 'x86_64' else 'Linux_arm64' }}.tar.gz errata-ai/vale"
Expand Down
34 changes: 22 additions & 12 deletions .ansible/variables-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ apt:
install:
- 7zip
- btrfs-progs
- cifs-utils # The SMB/CIFS protocol for cross-platform file sharing.
- coreutils
- curl
- fdupes
Expand All @@ -18,8 +19,10 @@ apt:
- git-lfs
- gpg
- gzip
- hashcat
- htop
- iotop
- john
- libhyperscan-dev
- libicu-dev
- libpcre2-dev
Expand All @@ -28,6 +31,7 @@ apt:
- libzstd-dev
- lz4
- mawk
- mkisofs
- net-tools # ifconfig
- p7zip
- parallel
Expand All @@ -41,14 +45,17 @@ apt:
- speedtest-cli
- sqlite3
- time
- transmission
- tmux
- unrar
- vim
- vlc
- wget
- zstd
releases:
brave: true
code: true
protonvpn: true
upgrade: true

# List of files and directories to symlink into the home directory.
Expand Down Expand Up @@ -107,18 +114,21 @@ dotfiles:

eget: true
eget_packages:
- alpha-miner
- bat
- btop
- duf
- eza
- fd
- jq
- pandoc
- rg
- tealdeer
- vale
- yq
- alpha-miner # Fastest Available Pearl Mining Software (AlphaMine-Tech/alpha-miner)
- bat # A cat(1) clone with wings (sharkdp/bat)
- btop # Resource monitor that shows usage and stats (aristocratos/btop)
- duf # Disk Usage/Free Utility - a better 'df' (muesli/duf)
- eza # A modern, maintained replacement for 'ls' (eza-community/eza)
- fd # A simple, fast and user-friendly alternative to 'find' (sharkdp/fd)
- jq # Command-line JSON processor (jqlang/jq)
- oyster # Pearl Wallet management (pearl-research-labs/pearl)
- pandoc # Universal markup converter (jgm/pandoc)
- pearld # Pearl Full node (pearl-research-labs/pearl)
- prlctl # Pearl Control utility (pearl-research-labs/pearl)
- rg # ripgrep recursively searches directories for a regex pattern (BurntSushi/ripgrep)
- tealdeer # A fast tldr client written in Rust (dbrgn/tealdeer)
- vale # A syntax-aware linter for prose (errata-ai/vale)
- yq # Portable command-line YAML, JSON, XML, CSV, TOML and properties processor (mikefarah/yq)

nvidia:
cuda_toolkit: true
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ node_modules/

# Ansible local variables
.ansible/variables.yml

# NAS
.nas_credentials
3 changes: 3 additions & 0 deletions .nas_credentials.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
username=admin
password=YOUR_PASSWORD
domain= # leave empty or put WORKGROUP
Loading