Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
97a38c2
attempt to install nix
capsulecorplab May 2, 2024
7ef2e30
attempt to display stdout & stderr for nix install
capsulecorplab May 14, 2024
9593baf
install nix as single-user (no daemon)
capsulecorplab Mar 7, 2025
12040f5
Create /nix directory and set permission before installing nix (as si…
capsulecorplab Mar 7, 2025
1116efc
set playbook verbosity to -v
capsulecorplab Mar 7, 2025
322bd00
set playbook verbosity to -vv
capsulecorplab Mar 7, 2025
a503a62
set playbook verbosity to -vvv
capsulecorplab Mar 7, 2025
2077537
set bash to print verbose command execution before nix install
capsulecorplab Mar 7, 2025
b280cd5
set playbook verbosity to -vvvv
capsulecorplab Mar 7, 2025
3357c1d
install nix using nix-installer
capsulecorplab Mar 18, 2025
8e20c0c
replace nix installation w/ provizanta.nix (ansible role)
capsulecorplab Nov 16, 2025
ec4e94d
attempt to install nix-bin
capsulecorplab Nov 18, 2025
936cc2a
Get git version
capsulecorplab Nov 18, 2025
11251c7
attempt to install git with nix
capsulecorplab Nov 18, 2025
61baffc
remove staticdev.firefox (ansible role)
capsulecorplab Nov 18, 2025
bec8470
attempt to enable flakes
capsulecorplab Nov 19, 2025
bd478b4
Add kasm-user to nix-users group
capsulecorplab Nov 20, 2025
255c749
Merge branch 'main' into refactor-playbook-to-use-nix
capsulecorplab May 28, 2026
9821994
attempt to install pinned version of git using nix
capsulecorplab May 28, 2026
7bc4748
refactor bash-completion installation using nix
capsulecorplab May 28, 2026
4a4300e
attempt to refactor keychain installation using nix
capsulecorplab May 30, 2026
4586675
temporarily comment out keychain version test
capsulecorplab May 30, 2026
c5948e7
refactor ping installation using nix
capsulecorplab Jun 1, 2026
90c984b
attempt to reinstall voila
capsulecorplab Jun 2, 2026
f370a2f
add tag for install_python_packages
capsulecorplab Jun 3, 2026
e872487
attempt to install pinnned jupyterlab & notebook
capsulecorplab Jun 3, 2026
d4fc85c
attempt to pass --ignore-installed
capsulecorplab Jun 3, 2026
3f7dea4
temporarily comment out foam installation
capsulecorplab Jun 17, 2026
3525cd1
Attempt to reinstall nix using determinate nix installer (in a contai…
capsulecorplab Oct 17, 2026
d0b8529
Attempt to re-install nix with official nix installer (single-user; n…
capsulecorplab Oct 17, 2026
3f7a1d4
Attempt to fix stupid syntax error
capsulecorplab Oct 17, 2026
b079015
revert nix installation to apt-installed nix-bin & configure nix to u…
capsulecorplab Oct 17, 2026
1391251
Attempt to configure nix to use a legacy compatible channel directly …
capsulecorplab Oct 17, 2026
4a55220
Attempt to access nixpkgs from locally cloned package definitions
capsulecorplab Oct 17, 2026
bc3ecd6
remove `nixpkgs.` prefix for packages installed with nix-env
capsulecorplab Oct 17, 2026
10ba233
Update vs code version to 1.91.1*
capsulecorplab Oct 17, 2026
08cef8d
revert to using nix profile for installing packages from nixpkgs
capsulecorplab Oct 17, 2026
c2b083f
Attempt to install nix packages with --profile /nix/var/nix/profiles/…
capsulecorplab Oct 20, 2026
35f8403
Create (missing) nix system profile
capsulecorplab Oct 20, 2026
9b4fd1e
Revert "Create (missing) nix system profile"
capsulecorplab Oct 20, 2026
10189f3
set profile directory to /nix/var/nix/profiles/per-user/root
capsulecorplab Oct 20, 2026
6093786
Create symlink directory for /nix/var/nix/profiles/per-user/root
capsulecorplab Oct 20, 2026
5e6bad5
Copy script for exporting nix root profile to path to /etc/profile.d/…
capsulecorplab Oct 21, 2026
f6dd6ca
add shebang line to nix root profile exporter script
capsulecorplab Oct 21, 2026
bbbd840
Re-attempt to install (single-user) nix using classic nix installer, …
capsulecorplab Oct 21, 2026
a86dd55
comment out task to add kasm-user to nix-users group
capsulecorplab Oct 21, 2026
7069859
temporarily comment out nix installed packages
capsulecorplab Oct 21, 2026
307fabb
install multi-user nix (instead of single-user) w/ --fallback
capsulecorplab Oct 21, 2026
68a1f29
attempt to install nix from ansible role
capsulecorplab Oct 21, 2026
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apt update && apt -y install software-properties-common && add-apt-repositor

# run Ansible commands
COPY ./requirements.yaml ./playbook.yaml ./
RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -i,localhost playbook.yaml --tags "all" && rm -f ./*.yaml
RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -vvvv -i,localhost playbook.yaml --tags "all" && rm -f ./*.yaml

# Custom Desktop Background - replace bg_custom.png on disk with your own background image
COPY ./bg_fairy_penguins_1600x800.png /usr/share/backgrounds/bg_default.png
Expand Down
5 changes: 5 additions & 0 deletions install_files/nix-root-profile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/bash
# Add Nix root profile to the system PATH
if [ -d /nix/var/nix/profiles/per-user/root/bin ]; then
export PATH="/nix/var/nix/profiles/per-user/root/bin:$PATH"
fi
146 changes: 64 additions & 82 deletions playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,98 +78,70 @@
- role: webarchitect609.google_chrome

-
# install firefox
# install keychain, git, nix, and @capsulecorplab .vimrc and .gitconfig
hosts: localhost
connection: local
gather_facts: yes
tags:
- install_firefox

vars:
firefox_profiles:
default:
extensions:
- ublock-origin
preferences:
network.cookie.cookieBehavior: 1
privacy.donottrackheader.enabled: true
datareporting.healthreport.uploadEnabled: false
secondprofile:
extensions:
- adblock-plus
preferences:
privacy.donottrackheader.enabled: false
privacy.trackingprotection.enabled: false
signon.rememberSignons: false
datareporting.healthreport.uploadEnabled: false

tasks:
- name: Get disk usage
shell: df -h
register: disk_usage
- name: Display disk usage
debug:
msg: "{{ disk_usage.stdout }}"

pre_tasks:
- name: Update apt packages
apt:
update_cache: yes

roles:
- role: staticdev.firefox

-
# install keychain, git, and @capsulecorplab .vimrc and .gitconfig
hosts: localhost
connection: local
gather_facts: yes
tags: install_utilities
- install_utilities
- install_python_packages

vars:
git_version: "2.43.0"
git_version_to_install: "1:{{ git_version }}-1ubuntu7"
nixos_release: "26.05"
keychain_version: "2.8.5"
keychain_version_to_install: "{{ keychain_version }}-4"
keychain_version_expected: "{{ keychain_version }}.."

tasks:
- name: Add git PPA
shell: add-apt-repository ppa:git-core/ppa
- name: Install git
apt:
name: git
- name: Install Git Bash Completion
apt:
name: bash-completion
update_cache: yes
- name: Install Keychain
apt:
name: "keychain={{ keychain_version_to_install }}"
update_cache: yes
- name: install ping
apt:
name: iputils-ping
update_cache: yes
- name: Get git version
shell: git version | sed 's/[[:alpha:]|(|[:space:]]//g'
register: installed_git_version
- name: Get keychain version
shell:
cmd: keychain -V 2> >(grep -i keychain) 2> >(sed 's/[[:alpha:]|(|[:space:]]//g') | fgrep '*' | sed 's/[*~://]//g'
executable: /bin/bash
register: installed_keychain_version
- name: Display git and keychain versions
debug:
msg: "git = {{ installed_git_version.stdout }} | keychain = {{ installed_keychain_version.stdout }}"
- name: Test git version
fail:
msg: "Git Version Error: Expected {{ git_version }} | Found {{ installed_git_version.stdout }}"
when: installed_git_version.stdout != git_version
- name: Test keychain version
fail:
msg: "Keychain Version Error: Expected {{ keychain_version_expected }} | Found {{ installed_keychain_version.stdout }}"
when: installed_keychain_version.stdout != keychain_version_expected
# - name: Install nix-bin # see https://moonpiedumplings.github.io/projects/setting-up-kasm/#customized-kasm-images
# apt:
# name: nix-bin
# update_cache: yes
# - name: Install (multi-user) nix using classic nix installer
# shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --daemon --fallback
# - name: Add kasm-user to nix-users group
# shell: usermod -aG nix-users kasm-user
# - name: Remove existing /nix/var/nix/profiles/per-user/root directory
# shell: rm -rf /nix/var/nix/profiles/per-user/root
# - name: Create temporary first-generation directory
# shell: mkdir -p /nix/var/nix/profiles/per-user/root-gen-0
# - name: Symlink /nix/var/nix/profiles/per-user/root to /nix/var/nix/profiles/per-user/root-gen-0
# shell: ln -sfn /nix/var/nix/profiles/per-user/root-gen-0 /nix/var/nix/profiles/per-user/root
# - name: Copy script for exporting nix root profile to path to /etc/profile.d/nix-root-profile.sh
# copy:
# src: /home/kasm-default-profile/install_files/nix-root-profile.sh
# dest: /etc/profile.d/nix-root-profile.sh
# remote_src: yes
# owner: root
# group: root
# mode: '0755'
# - name: Install git {{ git_version }} with nix
# shell: nix profile install nixpkgs/release-{{ nixos_release }}#git --extra-experimental-features 'nix-command flakes' --profile /nix/var/nix/profiles/per-user/root
# - name: Install Git Bash Completion
# shell: nix profile install nixpkgs/release-{{ nixos_release }}#bash-completion --extra-experimental-features 'nix-command flakes' --profile /nix/var/nix/profiles/per-user/root
# - name: Install Keychain
# shell: nix profile install nixpkgs/release-{{ nixos_release }}#keychain --extra-experimental-features 'nix-command flakes' --profile /nix/var/nix/profiles/per-user/root
# - name: install ping
# shell: nix profile install nixpkgs#unixtools.ping --extra-experimental-features 'nix-command flakes' --profile /nix/var/nix/profiles/per-user/root
# - name: Get keychain version
# shell:
# cmd: keychain -V 2> >(grep -i keychain) 2> >(sed 's/[[:alpha:]|(|[:space:]]//g') | fgrep '*' | sed 's/[*~://]//g'
# executable: /bin/bash
# register: installed_keychain_version
# - name: Get git version
# shell: git version | sed 's/[[:alpha:]|(|[:space:]]//g'
# register: installed_git_version
# - name: Display git and keychain versions
# debug:
# msg: "git = {{ installed_git_version.stdout }} | keychain = {{ installed_keychain_version.stdout }}"
# - name: Test git version
# fail:
# msg: "Git Version Error: Expected {{ git_version }} | Found {{ installed_git_version.stdout }}"
# when: installed_git_version.stdout != git_version
#- name: Test keychain version
# fail:
# msg: "Keychain Version Error: Expected {{ keychain_version_expected }} | Found {{ installed_keychain_version.stdout }}"
# when: installed_keychain_version.stdout != keychain_version_expected
- name: Install @capsulecorplab .vimrc
get_url:
url: https://gist.githubusercontent.com/capsulecorplab/495058e7a57ed8adaed3c40c80d09739/raw/4a6e6f6ff92b96919be111c9cbb5a4a21ab472d2/.vimrc
Expand All @@ -185,11 +157,16 @@
debug:
msg: "{{ disk_usage.stdout }}"

roles:
- role: danielrolls.nix

-
# install Python packages with pip
hosts: localhost
connection: local
gather_facts: yes
tags:
- install_python_packages

tasks:
- name: Update OS to point python to python3
Expand All @@ -205,6 +182,10 @@
break_system_packages: true
name:
- pint
- voila
- notebook==6.5.7
- jupyterlab==3.6.8
extra_args: --ignore-installed
- name: Get disk usage
shell: df -h
register: disk_usage
Expand Down Expand Up @@ -369,12 +350,13 @@

roles:
- role: gantsign.visual-studio-code
visual_studio_code_version: "1.91.1*"
users:
- username: "dev"
visual_studio_code_extensions:
- ms-python.python
- dendron.dendron
- foam.foam-vscode
#- foam.foam-vscode
visual_studio_code_settings_overwrite: yes
visual_studio_code_settings: {
"extensions.ignoreRecommendations": true,
Expand Down
2 changes: 1 addition & 1 deletion requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
- irixjp.role_example_hello # https://galaxy.ansible.com/irixjp/role_example_hello
- grzegorznowak.nvm_node # https://galaxy.ansible.com/grzegorznowak/nvm_node
- webarchitect609.google_chrome # https://galaxy.ansible.com/webarchitect609/google_chrome
- staticdev.firefox # https://galaxy.ansible.com/staticdev/firefox
- gantsign.visual-studio-code # https://galaxy.ansible.com/gantsign/visual-studio-code
- danielrolls.nix # https://galaxy.ansible.com/danielrolls/nix
...
Loading