From 97a38c2631f5c1a8eb5dde74198141e30f00adae Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 1 May 2024 23:40:17 -0700 Subject: [PATCH 01/69] attempt to install nix --- playbook.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 3e0db30..4e639e9 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -151,6 +151,10 @@ apt: name: iputils-ping update_cache: yes + - name: Install nix # as per https://nixos.org/download/#download-nix + shell: + cmd: sh <(curl -L https://nixos.org/nix/install) --daemon + executable: /bin/bash - name: Get git version shell: git version | sed 's/[[:alpha:]|(|[:space:]]//g' register: installed_git_version From 7ef2e3050de9d1a483c64c97223ac9b144e7fac7 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 14 May 2024 02:31:59 -0700 Subject: [PATCH 02/69] attempt to display stdout & stderr for nix install --- playbook.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 4e639e9..765b36e 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -155,6 +155,13 @@ shell: cmd: sh <(curl -L https://nixos.org/nix/install) --daemon executable: /bin/bash + register: output_of_nix_install + - name: Display stdout of nix install + debug: + msg: "{{ output_of_nix_install.stdout }}" + - name: Display stderr of nix install + debug: + msg: "{{ output_of_nix_install.stderr }}" - name: Get git version shell: git version | sed 's/[[:alpha:]|(|[:space:]]//g' register: installed_git_version From 9593baf32da595375a8bac9f4e680c8b5f9fddbe Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 7 Mar 2025 10:39:12 -0700 Subject: [PATCH 03/69] install nix as single-user (no daemon) --- playbook.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 765b36e..1887a1b 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -151,9 +151,9 @@ apt: name: iputils-ping update_cache: yes - - name: Install nix # as per https://nixos.org/download/#download-nix + - name: Install nix (as single-user) # as per https://nixos.org/download/#download-nix shell: - cmd: sh <(curl -L https://nixos.org/nix/install) --daemon + cmd: sh <(curl -L https://nixos.org/nix/install) --no-daemon executable: /bin/bash register: output_of_nix_install - name: Display stdout of nix install From 12040f53f3e35e88a3a7bbf7eb4e8941c003b6e1 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 7 Mar 2025 10:50:48 -0700 Subject: [PATCH 04/69] Create /nix directory and set permission before installing nix (as single-user) --- playbook.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 1887a1b..c0195be 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -151,6 +151,10 @@ apt: name: iputils-ping update_cache: yes + - name: Create /nix directory and set permissions + shell: + cmd: mkdir -m 0755 /nix && chown root /nix + executable: /bin/bash - name: Install nix (as single-user) # as per https://nixos.org/download/#download-nix shell: cmd: sh <(curl -L https://nixos.org/nix/install) --no-daemon From 1116efc00f60b14936295c4ea57faa1344a09240 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 7 Mar 2025 10:59:17 -0700 Subject: [PATCH 05/69] set playbook verbosity to -v --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 201e69d..aea5dba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -v -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 From 322bd00f26c1dd632e4003cd16f8b0b99aa296bc Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 7 Mar 2025 11:07:27 -0700 Subject: [PATCH 06/69] set playbook verbosity to -vv --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aea5dba..2edf443 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -v -i,localhost playbook.yaml --tags "all" && rm -f ./*.yaml +RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -vv -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 From a503a622824af4415ef34bda38575de6b3ef432e Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 7 Mar 2025 11:15:32 -0700 Subject: [PATCH 07/69] set playbook verbosity to -vvv --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2edf443..823322e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -vv -i,localhost playbook.yaml --tags "all" && rm -f ./*.yaml +RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -vvv -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 From 207753773fcbe390503690f071b04998d1429596 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 7 Mar 2025 11:32:09 -0700 Subject: [PATCH 08/69] set bash to print verbose command execution before nix install --- playbook.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbook.yaml b/playbook.yaml index c0195be..0025078 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -157,7 +157,7 @@ executable: /bin/bash - name: Install nix (as single-user) # as per https://nixos.org/download/#download-nix shell: - cmd: sh <(curl -L https://nixos.org/nix/install) --no-daemon + cmd: set -x; sh <(curl -L https://nixos.org/nix/install) --no-daemon executable: /bin/bash register: output_of_nix_install - name: Display stdout of nix install From b280cd58785c48d7b2f3e0dbce043f8a1f7f604b Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 7 Mar 2025 11:50:25 -0700 Subject: [PATCH 09/69] set playbook verbosity to -vvvv --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 823322e..1b65d5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -vvv -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 From 3357c1db9b6367401191070ffa5518b0bc266cac Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 18 Mar 2025 13:05:24 -0700 Subject: [PATCH 10/69] install nix using nix-installer as per https://zero-to-nix.com/start/install/ - run nix-installer with --no-confirm --- playbook.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 0025078..be0aff2 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -155,9 +155,20 @@ shell: cmd: mkdir -m 0755 /nix && chown root /nix executable: /bin/bash - - name: Install nix (as single-user) # as per https://nixos.org/download/#download-nix + - name: Download nix-installer # as https://zero-to-nix.com/start/install/ shell: - cmd: set -x; sh <(curl -L https://nixos.org/nix/install) --no-daemon + cmd: curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix > nix-installer.sh + chdir: /home/kasm-default-profile/install_files + executable: /bin/bash + - name: Make nix-installer executable + shell: + cmd: chmod +x nix-installer.sh + chdir: /home/kasm-default-profile/install_files + executable: /bin/bash + - name: Install nix using nix-installer + shell: + cmd: ./nix-installer.sh install --no-confirm + chdir: /home/kasm-default-profile/install_files executable: /bin/bash register: output_of_nix_install - name: Display stdout of nix install From 8e20c0ce2ae49db95baf1462b3fc2ffd22b5a9a8 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 15 Nov 2025 23:36:29 -0700 Subject: [PATCH 11/69] replace nix installation w/ provizanta.nix (ansible role) --- playbook.yaml | 32 +++----------------------------- requirements.yaml | 1 + 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index be0aff2..2d6e549 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -151,35 +151,6 @@ apt: name: iputils-ping update_cache: yes - - name: Create /nix directory and set permissions - shell: - cmd: mkdir -m 0755 /nix && chown root /nix - executable: /bin/bash - - name: Download nix-installer # as https://zero-to-nix.com/start/install/ - shell: - cmd: curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix > nix-installer.sh - chdir: /home/kasm-default-profile/install_files - executable: /bin/bash - - name: Make nix-installer executable - shell: - cmd: chmod +x nix-installer.sh - chdir: /home/kasm-default-profile/install_files - executable: /bin/bash - - name: Install nix using nix-installer - shell: - cmd: ./nix-installer.sh install --no-confirm - chdir: /home/kasm-default-profile/install_files - executable: /bin/bash - register: output_of_nix_install - - name: Display stdout of nix install - debug: - msg: "{{ output_of_nix_install.stdout }}" - - name: Display stderr of nix install - debug: - msg: "{{ output_of_nix_install.stderr }}" - - 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' @@ -211,6 +182,9 @@ debug: msg: "{{ disk_usage.stdout }}" + roles: + - role: nix + - # install Python packages with pip hosts: localhost diff --git a/requirements.yaml b/requirements.yaml index 46d4674..1c3bf63 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -5,4 +5,5 @@ - 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 +- provizanta.nix # https://galaxy.ansible.com/ui/standalone/roles/provizanta/nix ... From ec4e94d76f1ab714812bdb60583bda60d2c85b1e Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 18 Nov 2025 10:58:50 -0700 Subject: [PATCH 12/69] attempt to install nix-bin --- playbook.yaml | 9 +++++---- requirements.yaml | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 2d6e549..c751354 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -120,7 +120,7 @@ - role: staticdev.firefox - - # install keychain, git, and @capsulecorplab .vimrc and .gitconfig + # install keychain, git, nix, and @capsulecorplab .vimrc and .gitconfig hosts: localhost connection: local gather_facts: yes @@ -147,6 +147,10 @@ apt: name: "keychain={{ keychain_version_to_install }}" update_cache: yes + - 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 ping apt: name: iputils-ping @@ -182,9 +186,6 @@ debug: msg: "{{ disk_usage.stdout }}" - roles: - - role: nix - - # install Python packages with pip hosts: localhost diff --git a/requirements.yaml b/requirements.yaml index 1c3bf63..46d4674 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -5,5 +5,4 @@ - 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 -- provizanta.nix # https://galaxy.ansible.com/ui/standalone/roles/provizanta/nix ... From 936cc2acee28a5a375a2ba8252de06617c517347 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 18 Nov 2025 12:38:20 -0700 Subject: [PATCH 13/69] Get git version --- playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index c751354..04082ca 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -160,6 +160,9 @@ 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 }}" From 11251c7b8b3f76377fd7c11e0a1a03f46998010e Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 18 Nov 2025 13:15:46 -0700 Subject: [PATCH 14/69] attempt to install git with nix --- playbook.yaml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 04082ca..458f89a 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -134,11 +134,12 @@ keychain_version_expected: "{{ keychain_version }}.." tasks: - - name: Add git PPA - shell: add-apt-repository ppa:git-core/ppa - - name: Install git + - name: Install nix-bin # see https://moonpiedumplings.github.io/projects/setting-up-kasm/#customized-kasm-images apt: - name: git + name: nix-bin + update_cache: yes + - name: Install git with nix + shell: nix profile install nixpkgs#git --extra-experimental-features nix-command - name: Install Git Bash Completion apt: name: bash-completion @@ -147,10 +148,6 @@ apt: name: "keychain={{ keychain_version_to_install }}" update_cache: yes - - 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 ping apt: name: iputils-ping From 61baffc5b227bcdea10c039f338e7a597b010bef Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 18 Nov 2025 15:00:01 -0700 Subject: [PATCH 15/69] remove staticdev.firefox (ansible role) --- playbook.yaml | 42 ------------------------------------------ requirements.yaml | 1 - 2 files changed, 43 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 458f89a..c583a9a 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -77,48 +77,6 @@ roles: - role: webarchitect609.google_chrome -- - # install firefox - 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, nix, and @capsulecorplab .vimrc and .gitconfig hosts: localhost diff --git a/requirements.yaml b/requirements.yaml index 46d4674..d33accb 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -3,6 +3,5 @@ - 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 ... From bec8470590e697cfdcaa30c9b43e18e10870294b Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 18 Nov 2025 18:41:45 -0700 Subject: [PATCH 16/69] attempt to enable flakes --- playbook.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbook.yaml b/playbook.yaml index c583a9a..a520dca 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -97,7 +97,7 @@ name: nix-bin update_cache: yes - name: Install git with nix - shell: nix profile install nixpkgs#git --extra-experimental-features nix-command + shell: nix profile install nixpkgs#git --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Git Bash Completion apt: name: bash-completion From bd478b4ca03086097d0f9a072c2a7696ed9dc332 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 19 Nov 2025 23:15:42 -0700 Subject: [PATCH 17/69] Add kasm-user to nix-users group --- playbook.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index a520dca..2171574 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -96,6 +96,8 @@ apt: name: nix-bin update_cache: yes + - name: Add kasm-user to nix-users group + shell: usermod -aG nix-users kasm-user - name: Install git with nix shell: nix profile install nixpkgs#git --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Git Bash Completion From 98219940ae8658ebc79289f0ef2712e8dcb98430 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 27 May 2026 19:06:00 -0700 Subject: [PATCH 18/69] attempt to install pinned version of git using nix --- playbook.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 9688c03..76a3cab 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -86,7 +86,7 @@ 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 }}.." @@ -98,8 +98,8 @@ update_cache: yes - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user - - name: Install git with nix - shell: nix profile install nixpkgs#git --extra-experimental-features nix-command --extra-experimental-features flakes + - name: Install git {{ git_version }} with nix + shell: nix profile install nixpkgs/release-{{ nixos_release }}#git --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Git Bash Completion apt: name: bash-completion From 7bc47484d6e94cb612f3657afb3dc3e4e4d6cbd8 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 27 May 2026 21:11:24 -0700 Subject: [PATCH 19/69] refactor bash-completion installation using nix --- playbook.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 76a3cab..7790b5e 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -101,9 +101,7 @@ - name: Install git {{ git_version }} with nix shell: nix profile install nixpkgs/release-{{ nixos_release }}#git --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Git Bash Completion - apt: - name: bash-completion - update_cache: yes + shell: nix profile install nixpkgs/release-{{ nixos_release }}#bash-completion --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Keychain apt: name: "keychain={{ keychain_version_to_install }}" From 4a4300e26adf7c81bbdf8c00b8658c79bab61dfd Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 30 May 2026 10:34:31 -0700 Subject: [PATCH 20/69] attempt to refactor keychain installation using nix --- playbook.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 7790b5e..27bab61 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -88,7 +88,6 @@ git_version: "2.43.0" nixos_release: "26.05" keychain_version: "2.8.5" - keychain_version_to_install: "{{ keychain_version }}-4" keychain_version_expected: "{{ keychain_version }}.." tasks: @@ -103,9 +102,7 @@ - name: Install Git Bash Completion shell: nix profile install nixpkgs/release-{{ nixos_release }}#bash-completion --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Keychain - apt: - name: "keychain={{ keychain_version_to_install }}" - update_cache: yes + shell: nix profile install nixpkgs/release-{{ nixos_release }}#keychain --extra-experimental-features nix-command --extra-experimental-features flakes - name: install ping apt: name: iputils-ping From 4586675d4aa2a14ba600d94e63bc4917e68a76e1 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 30 May 2026 10:47:38 -0700 Subject: [PATCH 21/69] temporarily comment out keychain version test --- playbook.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 27bab61..788693b 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -122,10 +122,10 @@ 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: 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 From c5948e71a3462ceafdeea69d4cc68a821caecd64 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Mon, 1 Jun 2026 13:25:24 -0700 Subject: [PATCH 22/69] refactor ping installation using nix --- playbook.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 788693b..1c4756d 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -104,9 +104,7 @@ - name: Install Keychain shell: nix profile install nixpkgs/release-{{ nixos_release }}#keychain --extra-experimental-features nix-command --extra-experimental-features flakes - name: install ping - apt: - name: iputils-ping - update_cache: yes + shell: nix profile install nixpkgs#unixtools.ping --extra-experimental-features nix-command --extra-experimental-features flakes - name: Get keychain version shell: cmd: keychain -V 2> >(grep -i keychain) 2> >(sed 's/[[:alpha:]|(|[:space:]]//g') | fgrep '*' | sed 's/[*~://]//g' From 90c984b35e05d3afdb3c4b7b10a58204ed091e2a Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 2 Jun 2026 12:47:58 -0700 Subject: [PATCH 23/69] attempt to reinstall voila --- playbook.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbook.yaml b/playbook.yaml index 1c4756d..9d77e35 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -159,6 +159,7 @@ break_system_packages: true name: - pint + - voila - name: Get disk usage shell: df -h register: disk_usage From f370a2f790fcf47703d5116b0dfadb9457cae7e8 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 3 Jun 2026 13:33:32 -0700 Subject: [PATCH 24/69] add tag for install_python_packages --- playbook.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/playbook.yaml b/playbook.yaml index 9d77e35..657ea4c 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -82,7 +82,9 @@ hosts: localhost connection: local gather_facts: yes - tags: install_utilities + tags: + - install_utilities + - install_python_packages vars: git_version: "2.43.0" @@ -144,6 +146,8 @@ hosts: localhost connection: local gather_facts: yes + tags: + - install_python_packages tasks: - name: Update OS to point python to python3 From e8724873e4758f6faeb3b5140f60908db1e4cf7e Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 3 Jun 2026 14:23:28 -0700 Subject: [PATCH 25/69] attempt to install pinnned jupyterlab & notebook --- playbook.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 657ea4c..405169f 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -164,6 +164,8 @@ name: - pint - voila + - notebook==6.5.7 + - jupyterlab==3.6.8 - name: Get disk usage shell: df -h register: disk_usage From d4fc85c7d305c6e01c1a578eeca4886157a3cacc Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 3 Jun 2026 15:07:41 -0700 Subject: [PATCH 26/69] attempt to pass --ignore-installed as per https://stackoverflow.com/questions/49932759/pip-10-and-apt-how-to-avoid-cannot-uninstall-x-errors-for-distutils-packages --- playbook.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbook.yaml b/playbook.yaml index 405169f..052b4b5 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -166,6 +166,7 @@ - voila - notebook==6.5.7 - jupyterlab==3.6.8 + extra_args: --ignore-installed - name: Get disk usage shell: df -h register: disk_usage From 3f7dea46034ed6759c578460747cfd9a68a8f12a Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 17 Jun 2026 10:27:07 -0700 Subject: [PATCH 27/69] temporarily comment out foam installation --- playbook.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbook.yaml b/playbook.yaml index 052b4b5..492ca98 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -336,7 +336,7 @@ 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, From 3525cd1a34d8139e3edc1e319198b1d932956ecf Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 16 Oct 2026 17:16:00 -0700 Subject: [PATCH 28/69] Attempt to reinstall nix using determinate nix installer (in a container) See https://github.com/DeterminateSystems/nix-installer#in-a-container --- playbook.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 492ca98..bcc05e6 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -93,10 +93,15 @@ keychain_version_expected: "{{ keychain_version }}.." tasks: - - 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 nix using determinate nix installer # see https://github.com/DeterminateSystems/nix-installer#in-a-container + shell: | + curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --extra-conf "sandbox = false" --init none --no-confirm + args: + creates: /nix/var/nix/profile/bin/nix + #- name: Install nix-bin # see https://moonpiedumplings.github.io/projects/setting-up-kasm/#customized-kasm-images + # apt: + # name: nix-bin + # update_cache: yes - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user - name: Install git {{ git_version }} with nix From d0b85293c86a59d34e782357bf7e382cd7f3150d Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 16 Oct 2026 17:26:33 -0700 Subject: [PATCH 29/69] Attempt to re-install nix with official nix installer (single-user; no-daemon) --- playbook.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index bcc05e6..9a5387a 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -93,11 +93,17 @@ keychain_version_expected: "{{ keychain_version }}.." tasks: - - name: Install nix using determinate nix installer # see https://github.com/DeterminateSystems/nix-installer#in-a-container + - name: Install nix using official non-daemon installer + become: yes shell: | - curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --extra-conf "sandbox = false" --init none --no-confirm + sh <(curl -L https://nixos.org/nix/install) --no-daemon args: creates: /nix/var/nix/profile/bin/nix + #- name: Install nix using determinate nix installer # see https://github.com/DeterminateSystems/nix-installer#in-a-container (Fails with`/nix/store/69vhmfdm78jb9c3yj0wykr2y8fnabysr-determinate-nix-3.23.2/bin/nix-store: /usr/lib/x86_64-linux-gnu/libcrypto.so.3: version `OPENSSL_3.4.0' not found (required by /nix/store/nm95jgm7w3qbrd44b63qnv2sr78k60ly-s2n-tls-1.7.6/lib/libs2n.so.1)` error) + # shell: | + # curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --extra-conf "sandbox = false" --init none --no-confirm + # args: + # creates: /nix/var/nix/profile/bin/nix #- name: Install nix-bin # see https://moonpiedumplings.github.io/projects/setting-up-kasm/#customized-kasm-images # apt: # name: nix-bin From 3f7a1d48495c37f28e542139c1027cee134a28f6 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 16 Oct 2026 17:36:02 -0700 Subject: [PATCH 30/69] Attempt to fix stupid syntax error --- playbook.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbook.yaml b/playbook.yaml index 9a5387a..c4ea211 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -96,7 +96,7 @@ - name: Install nix using official non-daemon installer become: yes shell: | - sh <(curl -L https://nixos.org/nix/install) --no-daemon + curl -L https://nixos.org/nix/install | sh -s -- --no-daemon args: creates: /nix/var/nix/profile/bin/nix #- name: Install nix using determinate nix installer # see https://github.com/DeterminateSystems/nix-installer#in-a-container (Fails with`/nix/store/69vhmfdm78jb9c3yj0wykr2y8fnabysr-determinate-nix-3.23.2/bin/nix-store: /usr/lib/x86_64-linux-gnu/libcrypto.so.3: version `OPENSSL_3.4.0' not found (required by /nix/store/nm95jgm7w3qbrd44b63qnv2sr78k60ly-s2n-tls-1.7.6/lib/libs2n.so.1)` error) From b079015934c42b599792fd75ada9f6d155972a60 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 16 Oct 2026 17:44:36 -0700 Subject: [PATCH 31/69] revert nix installation to apt-installed nix-bin & configure nix to use a legacy-compatible channel --- playbook.yaml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index c4ea211..b5a15d4 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -93,21 +93,32 @@ keychain_version_expected: "{{ keychain_version }}.." tasks: - - name: Install nix using official non-daemon installer - become: yes - shell: | - curl -L https://nixos.org/nix/install | sh -s -- --no-daemon - args: - creates: /nix/var/nix/profile/bin/nix + #- name: Install nix using official non-daemon installer + # become: yes + # shell: | + # curl -L https://nixos.org/nix/install | sh -s -- --no-daemon + # args: + # creates: /nix/var/nix/profile/bin/nix #- name: Install nix using determinate nix installer # see https://github.com/DeterminateSystems/nix-installer#in-a-container (Fails with`/nix/store/69vhmfdm78jb9c3yj0wykr2y8fnabysr-determinate-nix-3.23.2/bin/nix-store: /usr/lib/x86_64-linux-gnu/libcrypto.so.3: version `OPENSSL_3.4.0' not found (required by /nix/store/nm95jgm7w3qbrd44b63qnv2sr78k60ly-s2n-tls-1.7.6/lib/libs2n.so.1)` error) # shell: | # curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --extra-conf "sandbox = false" --init none --no-confirm # args: # creates: /nix/var/nix/profile/bin/nix - #- 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 nix-bin # see https://moonpiedumplings.github.io/projects/setting-up-kasm/#customized-kasm-images + apt: + name: nix-bin + update_cache: yes + - name: Configure Nix to use a legacy compatible channel + become: yes + shell: | + # Remove any existing channels to prevent conflicts + nix-channel --remove nixpkgs || true + # Add the NixOS 20.11 channel which is compatible with Nix 2.6.0 + nix-channel --add https://nixos.org/channels/nixos-20.11 nixpkgs + nix-channel --update + args: + # This ensures the task is idempotent + creates: /nix/var/nix/profiles/per-user/root/channels - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user - name: Install git {{ git_version }} with nix From 1391251ccf3ea2d167e506087b449b7f5c20cc0e Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 16 Oct 2026 17:55:24 -0700 Subject: [PATCH 32/69] Attempt to configure nix to use a legacy compatible channel directly from source tarball --- playbook.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index b5a15d4..075335d 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -108,13 +108,13 @@ apt: name: nix-bin update_cache: yes - - name: Configure Nix to use a legacy compatible channel + - name: Configure Nix to use a legacy compatible channel directly from source tarball become: yes shell: | - # Remove any existing channels to prevent conflicts + # Remove any existing failed channels nix-channel --remove nixpkgs || true - # Add the NixOS 20.11 channel which is compatible with Nix 2.6.0 - nix-channel --add https://nixos.org/channels/nixos-20.11 nixpkgs + # Use the GitHub archive instead of the nixos.org channel shortcut + nix-channel --add https://github.com/NixOS/nixpkgs/archive/nixos-20.11.tar.gz nixpkgs nix-channel --update args: # This ensures the task is idempotent From 4a5522000dbec7c2bfdb501de077540115e6e128 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 16 Oct 2026 18:21:02 -0700 Subject: [PATCH 33/69] Attempt to access nixpkgs from locally cloned package definitions --- playbook.yaml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 075335d..046216c 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -108,27 +108,23 @@ apt: name: nix-bin update_cache: yes - - name: Configure Nix to use a legacy compatible channel directly from source tarball + - name: Clone nixpkgs (version nixos-{{ nixos_release }}) repository locally become: yes - shell: | - # Remove any existing failed channels - nix-channel --remove nixpkgs || true - # Use the GitHub archive instead of the nixos.org channel shortcut - nix-channel --add https://github.com/NixOS/nixpkgs/archive/nixos-20.11.tar.gz nixpkgs - nix-channel --update - args: - # This ensures the task is idempotent - creates: /nix/var/nix/profiles/per-user/root/channels + git: + repo: 'https://github.com/NixOS/nixpkgs.git' + dest: /opt/nixpkgs-{{ nixos_release }} + version: nixos-{{ nixos_release }} + force: yes - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user - name: Install git {{ git_version }} with nix - shell: nix profile install nixpkgs/release-{{ nixos_release }}#git --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA nixpkgs.git --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Git Bash Completion - shell: nix profile install nixpkgs/release-{{ nixos_release }}#bash-completion --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA nixpkgs.bash-completion --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Keychain - shell: nix profile install nixpkgs/release-{{ nixos_release }}#keychain --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA nixpkgs.keychain --extra-experimental-features nix-command --extra-experimental-features flakes - name: install ping - shell: nix profile install nixpkgs#unixtools.ping --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA nixpkgs.unixtools.ping --extra-experimental-features nix-command --extra-experimental-features flakes - name: Get keychain version shell: cmd: keychain -V 2> >(grep -i keychain) 2> >(sed 's/[[:alpha:]|(|[:space:]]//g') | fgrep '*' | sed 's/[*~://]//g' From bc3ecd68d999f87a44c15c0cee2ec4c5a4f12026 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 16 Oct 2026 18:35:05 -0700 Subject: [PATCH 34/69] remove `nixpkgs.` prefix for packages installed with nix-env --- playbook.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 046216c..d5aadc5 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -118,13 +118,13 @@ - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user - name: Install git {{ git_version }} with nix - shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA nixpkgs.git --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA git --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Git Bash Completion - shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA nixpkgs.bash-completion --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA bash-completion --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Keychain - shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA nixpkgs.keychain --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA keychain --extra-experimental-features nix-command --extra-experimental-features flakes - name: install ping - shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA nixpkgs.unixtools.ping --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA unixtools.ping --extra-experimental-features nix-command --extra-experimental-features flakes - name: Get keychain version shell: cmd: keychain -V 2> >(grep -i keychain) 2> >(sed 's/[[:alpha:]|(|[:space:]]//g') | fgrep '*' | sed 's/[*~://]//g' From 10ba23314691825f3fb377368450e131f1ce685a Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 16 Oct 2026 18:57:44 -0700 Subject: [PATCH 35/69] Update vs code version to 1.91.1* --- playbook.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbook.yaml b/playbook.yaml index d5aadc5..f82ddeb 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -349,6 +349,7 @@ roles: - role: gantsign.visual-studio-code + visual_studio_code_version: "1.91.1*" users: - username: "dev" visual_studio_code_extensions: From 08cef8dbdcb31d7d3bbb3127cb63386b4050a63d Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 16 Oct 2026 23:33:28 -0700 Subject: [PATCH 36/69] revert to using nix profile for installing packages from nixpkgs --- playbook.yaml | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index f82ddeb..42e5893 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -93,38 +93,20 @@ keychain_version_expected: "{{ keychain_version }}.." tasks: - #- name: Install nix using official non-daemon installer - # become: yes - # shell: | - # curl -L https://nixos.org/nix/install | sh -s -- --no-daemon - # args: - # creates: /nix/var/nix/profile/bin/nix - #- name: Install nix using determinate nix installer # see https://github.com/DeterminateSystems/nix-installer#in-a-container (Fails with`/nix/store/69vhmfdm78jb9c3yj0wykr2y8fnabysr-determinate-nix-3.23.2/bin/nix-store: /usr/lib/x86_64-linux-gnu/libcrypto.so.3: version `OPENSSL_3.4.0' not found (required by /nix/store/nm95jgm7w3qbrd44b63qnv2sr78k60ly-s2n-tls-1.7.6/lib/libs2n.so.1)` error) - # shell: | - # curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --extra-conf "sandbox = false" --init none --no-confirm - # args: - # creates: /nix/var/nix/profile/bin/nix - name: Install nix-bin # see https://moonpiedumplings.github.io/projects/setting-up-kasm/#customized-kasm-images apt: name: nix-bin update_cache: yes - - name: Clone nixpkgs (version nixos-{{ nixos_release }}) repository locally - become: yes - git: - repo: 'https://github.com/NixOS/nixpkgs.git' - dest: /opt/nixpkgs-{{ nixos_release }} - version: nixos-{{ nixos_release }} - force: yes - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user - name: Install git {{ git_version }} with nix - shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA git --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix profile install nixpkgs/release-{{ nixos_release }}#git --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Git Bash Completion - shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA bash-completion --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix profile install nixpkgs/release-{{ nixos_release }}#bash-completion --extra-experimental-features nix-command --extra-experimental-features flakes - name: Install Keychain - shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA keychain --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix profile install nixpkgs/release-{{ nixos_release }}#keychain --extra-experimental-features nix-command --extra-experimental-features flakes - name: install ping - shell: nix-env -f /opt/nixpkgs-{{ nixos_release }} -iA unixtools.ping --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix profile install nixpkgs#unixtools.ping --extra-experimental-features nix-command --extra-experimental-features flakes - name: Get keychain version shell: cmd: keychain -V 2> >(grep -i keychain) 2> >(sed 's/[[:alpha:]|(|[:space:]]//g') | fgrep '*' | sed 's/[*~://]//g' From c2b083fe9e228c0e943cf4f16d5b2f2da49536a4 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 11:39:19 -0700 Subject: [PATCH 37/69] Attempt to install nix packages with --profile /nix/var/nix/profiles/system --- playbook.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 42e5893..db75279 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -100,13 +100,13 @@ - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user - name: Install git {{ git_version }} with nix - shell: nix profile install nixpkgs/release-{{ nixos_release }}#git --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix profile install nixpkgs/release-{{ nixos_release }}#git --extra-experimental-features 'nix-command flakes' --profile /nix/var/nix/profiles/system - name: Install Git Bash Completion - shell: nix profile install nixpkgs/release-{{ nixos_release }}#bash-completion --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix profile install nixpkgs/release-{{ nixos_release }}#bash-completion --extra-experimental-features 'nix-command flakes' --profile /nix/var/nix/profiles/system - name: Install Keychain - shell: nix profile install nixpkgs/release-{{ nixos_release }}#keychain --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix profile install nixpkgs/release-{{ nixos_release }}#keychain --extra-experimental-features 'nix-command flakes' --profile /nix/var/nix/profiles/system - name: install ping - shell: nix profile install nixpkgs#unixtools.ping --extra-experimental-features nix-command --extra-experimental-features flakes + shell: nix profile install nixpkgs#unixtools.ping --extra-experimental-features 'nix-command flakes' --profile /nix/var/nix/profiles/system - name: Get keychain version shell: cmd: keychain -V 2> >(grep -i keychain) 2> >(sed 's/[[:alpha:]|(|[:space:]]//g') | fgrep '*' | sed 's/[*~://]//g' From 35f8403f695471fbef4f49a6e287402b695c4d7d Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 12:41:03 -0700 Subject: [PATCH 38/69] Create (missing) nix system profile --- playbook.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index db75279..87a35b8 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -99,6 +99,8 @@ update_cache: yes - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user + - name: Create nix system profile + shell: mkdir -p /nix/var/nix/profiles/system - 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/system - name: Install Git Bash Completion From 9b4fd1e23d3c958be751535fd44435b8f2f57e11 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 12:52:03 -0700 Subject: [PATCH 39/69] Revert "Create (missing) nix system profile" This reverts commit 35f8403f695471fbef4f49a6e287402b695c4d7d. --- playbook.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 87a35b8..db75279 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -99,8 +99,6 @@ update_cache: yes - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user - - name: Create nix system profile - shell: mkdir -p /nix/var/nix/profiles/system - 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/system - name: Install Git Bash Completion From 10189f3ca34c4a35d8aa2aa969e1ea83d7022b20 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 12:54:32 -0700 Subject: [PATCH 40/69] set profile directory to /nix/var/nix/profiles/per-user/root --- playbook.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index db75279..6e552d4 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -100,13 +100,13 @@ - name: Add kasm-user to nix-users group shell: usermod -aG nix-users kasm-user - 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/system + 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/system + 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/system + 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/system + 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' From 6093786cd7a8e9bd3cd9f6d70be42e3401329800 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 13:45:50 -0700 Subject: [PATCH 41/69] Create symlink directory for /nix/var/nix/profiles/per-user/root --- playbook.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 6e552d4..73043ba 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -99,6 +99,12 @@ update_cache: yes - 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: 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 From 5e6bad5bc2cfa2a5664ab060d6afcbe9c05bef9d Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 17:03:45 -0700 Subject: [PATCH 42/69] Copy script for exporting nix root profile to path to /etc/profile.d/nix-root-profile.sh --- install_files/nix-root-profile.sh | 4 ++++ playbook.yaml | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 install_files/nix-root-profile.sh diff --git a/install_files/nix-root-profile.sh b/install_files/nix-root-profile.sh new file mode 100644 index 0000000..4055240 --- /dev/null +++ b/install_files/nix-root-profile.sh @@ -0,0 +1,4 @@ +# 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 diff --git a/playbook.yaml b/playbook.yaml index 73043ba..2fc3ba4 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -105,6 +105,14 @@ 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 From f6dd6caf6625e2ccb0523f729c6c4f1685904d59 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 17:44:11 -0700 Subject: [PATCH 43/69] add shebang line to nix root profile exporter script --- install_files/nix-root-profile.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install_files/nix-root-profile.sh b/install_files/nix-root-profile.sh index 4055240..b0ae655 100644 --- a/install_files/nix-root-profile.sh +++ b/install_files/nix-root-profile.sh @@ -1,3 +1,4 @@ +#!/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" From bbbd840f46e200dad90abb301a62315ef2c37008 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 18:26:46 -0700 Subject: [PATCH 44/69] Re-attempt to install (single-user) nix using classic nix installer, but with --fallback flag in attempt to build from source, pulling the appropriate OpenSSL version (>=3.4) from nix store --- playbook.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 2fc3ba4..0254911 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -93,10 +93,12 @@ keychain_version_expected: "{{ keychain_version }}.." tasks: - - 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 nix-bin # see https://moonpiedumplings.github.io/projects/setting-up-kasm/#customized-kasm-images + # apt: + # name: nix-bin + # update_cache: yes + - name: Install (single-user) nix using classic nix installer + shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --no-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 From a86dd5531502fd43ddd5a74436a706a0d2c95943 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 19:10:54 -0700 Subject: [PATCH 45/69] comment out task to add kasm-user to nix-users group --- playbook.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 0254911..ef19c39 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -99,8 +99,8 @@ # update_cache: yes - name: Install (single-user) nix using classic nix installer shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --no-daemon --fallback - - name: Add kasm-user to nix-users group - shell: usermod -aG nix-users kasm-user + # - 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 From 70698595ae6a8b3c629c8d64d1b85e6c235149e2 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 19:52:44 -0700 Subject: [PATCH 46/69] temporarily comment out nix installed packages --- playbook.yaml | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index ef19c39..daa9fe1 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -115,29 +115,29 @@ 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: 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 }}" From 307fabbdf1a84edba1182df81824b2909ab8e849 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 20:50:51 -0700 Subject: [PATCH 47/69] install multi-user nix (instead of single-user) w/ --fallback --- playbook.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index daa9fe1..8be6d65 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -97,8 +97,8 @@ # apt: # name: nix-bin # update_cache: yes - - name: Install (single-user) nix using classic nix installer - shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --no-daemon --fallback + - 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 From 68a1f295dd3043271abaf4122cef8320599d2b29 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Tue, 20 Oct 2026 22:24:03 -0700 Subject: [PATCH 48/69] attempt to install nix from ansible role --- playbook.yaml | 35 +++++++++++++++++++---------------- requirements.yaml | 1 + 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 8be6d65..688a741 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -97,24 +97,24 @@ # 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: 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: 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 @@ -157,6 +157,9 @@ debug: msg: "{{ disk_usage.stdout }}" + roles: + - role: danielrolls.nix + - # install Python packages with pip hosts: localhost diff --git a/requirements.yaml b/requirements.yaml index d33accb..436b066 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -4,4 +4,5 @@ - grzegorznowak.nvm_node # https://galaxy.ansible.com/grzegorznowak/nvm_node - webarchitect609.google_chrome # https://galaxy.ansible.com/webarchitect609/google_chrome - gantsign.visual-studio-code # https://galaxy.ansible.com/gantsign/visual-studio-code +- danielrolls.nix # https://galaxy.ansible.com/danielrolls/nix ... From bd82363bb564262a143e9daec2a462ea05a64172 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 21 Oct 2026 11:44:47 -0700 Subject: [PATCH 49/69] revert to single-user installation using official nix installer --- playbook.yaml | 7 ++----- requirements.yaml | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 688a741..851b783 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -97,8 +97,8 @@ # 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: Install (single-user) nix using classic nix installer + shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --no-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 @@ -157,9 +157,6 @@ debug: msg: "{{ disk_usage.stdout }}" - roles: - - role: danielrolls.nix - - # install Python packages with pip hosts: localhost diff --git a/requirements.yaml b/requirements.yaml index 436b066..d33accb 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -4,5 +4,4 @@ - grzegorznowak.nvm_node # https://galaxy.ansible.com/grzegorznowak/nvm_node - webarchitect609.google_chrome # https://galaxy.ansible.com/webarchitect609/google_chrome - gantsign.visual-studio-code # https://galaxy.ansible.com/gantsign/visual-studio-code -- danielrolls.nix # https://galaxy.ansible.com/danielrolls/nix ... From 9e66754824dc7f48fcdcb34dd4b61c55a5d45329 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 21 Oct 2026 18:31:05 -0700 Subject: [PATCH 50/69] temporarily set tags to install_utilities for ansible playbook in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1b65d5d..32afa77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -vvvv -i,localhost playbook.yaml --tags "all" && rm -f ./*.yaml +RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -vvvv -i,localhost playbook.yaml --tags "install_utilities" && 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 From 637573d7e1adc1d01f66b13f3f811097c1510a09 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 21 Oct 2026 19:03:53 -0700 Subject: [PATCH 51/69] Create /nix directory with chmod 755 --- playbook.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 851b783..31cc319 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -97,6 +97,11 @@ # apt: # name: nix-bin # update_cache: yes + - name: Create /nix directory with chmod 755 + file: + path: /nix + state: directory + mode: '0755' - name: Install (single-user) nix using classic nix installer shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --no-daemon --fallback # - name: Add kasm-user to nix-users group From 9481338e205722e4f7ac7ec90bc3c52cf105343d Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 21 Oct 2026 19:46:48 -0700 Subject: [PATCH 52/69] Attempt to install (single-user mode) nix using classic nix installer - create nix install directory - specify --fallback (to build from source, if prebuilt binary fails) - specify --profile-dir to override default nix-profile path - specify -- install-dir - verify binary installed --- playbook.yaml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 31cc319..6851414 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -87,8 +87,11 @@ - install_python_packages vars: - git_version: "2.43.0" nixos_release: "26.05" + nix_install_dir: "/opt/nix" + nix_bin_path: "{{ nix_install_dir }}/bin/nix" + nix_profile_dir: "/opt/nix-profile" + git_version: "2.43.0" keychain_version: "2.8.5" keychain_version_expected: "{{ keychain_version }}.." @@ -97,13 +100,23 @@ # apt: # name: nix-bin # update_cache: yes + - name: Create {{ nix_install_dir }} directory with chmod 755 + file: + path: "{{ nix_install_dir }}" + state: directory + mode: '0755' - name: Create /nix directory with chmod 755 file: path: /nix state: directory mode: '0755' - - name: Install (single-user) nix using classic nix installer - shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --no-daemon --fallback + - name: Set nix profile (environment variable) to /opt/nix-profile and install (single-user) nix using classic nix installer with --fallback (i.e., build from source to dynamically pull OpenSSL version) + shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --no-daemon --fallback --install-dir {{ nix_install_dir }} --profile-dir {{ nix_profile_dir }} + environment: + NIX_PROFILE: /{{ nix_profile_dir }} + NIX_INSTALLER_NO_MODIFY_PROFILE: 1 + args: + creates: "{{ nix_bin_path }}" # - 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 From 54e50b054fd3b58be61ec1d0289e8c0ddb9ab3c5 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 21 Oct 2026 22:38:39 -0700 Subject: [PATCH 53/69] Install sudo before running nix installation --- playbook.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 6851414..34a2894 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -110,6 +110,10 @@ path: /nix state: directory mode: '0755' + - name: Install Sudo + apt: + name: sudo + update_cache: yes - name: Set nix profile (environment variable) to /opt/nix-profile and install (single-user) nix using classic nix installer with --fallback (i.e., build from source to dynamically pull OpenSSL version) shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --no-daemon --fallback --install-dir {{ nix_install_dir }} --profile-dir {{ nix_profile_dir }} environment: From 40ef1fb31f82c105830b963f3c5bff58a9ce308a Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 21 Oct 2026 22:49:17 -0700 Subject: [PATCH 54/69] Install build dependencies --- playbook.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 34a2894..1512b74 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -110,6 +110,14 @@ path: /nix state: directory mode: '0755' + - name: Install build dependencies + apt: + name: + - xz-utils # unpacks binary tarball + - build-essential # gcc, make, etc. + - libssl-dev # for OpenSSL + - ca-certificates + update_cache: yes - name: Install Sudo apt: name: sudo From 5e38e26d01c1c7d9fce004be9b9be934d94dddf1 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Thu, 22 Oct 2026 01:28:56 -0700 Subject: [PATCH 55/69] Attempt to download nix tarball and run nix installation script directly - Download nix tarball with curl - Extract nix tarball with tar to /tmp - Run nix installer with --no-daemon & --fallback --- playbook.yaml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 1512b74..8d9f490 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -88,9 +88,8 @@ vars: nixos_release: "26.05" - nix_install_dir: "/opt/nix" - nix_bin_path: "{{ nix_install_dir }}/bin/nix" - nix_profile_dir: "/opt/nix-profile" + nix_version: "2.35.3" + nix_installer_dir: /tmp/nix-{{ nix_version }}-x86_64-linux git_version: "2.43.0" keychain_version: "2.8.5" keychain_version_expected: "{{ keychain_version }}.." @@ -100,11 +99,11 @@ # apt: # name: nix-bin # update_cache: yes - - name: Create {{ nix_install_dir }} directory with chmod 755 - file: - path: "{{ nix_install_dir }}" - state: directory - mode: '0755' + # - name: Create {{ nix_install_dir }} directory with chmod 755 + # file: + # path: "{{ nix_install_dir }}" + # state: directory + # mode: '0755' - name: Create /nix directory with chmod 755 file: path: /nix @@ -122,13 +121,20 @@ apt: name: sudo update_cache: yes - - name: Set nix profile (environment variable) to /opt/nix-profile and install (single-user) nix using classic nix installer with --fallback (i.e., build from source to dynamically pull OpenSSL version) - shell: curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --no-daemon --fallback --install-dir {{ nix_install_dir }} --profile-dir {{ nix_profile_dir }} - environment: - NIX_PROFILE: /{{ nix_profile_dir }} - NIX_INSTALLER_NO_MODIFY_PROFILE: 1 + - name: Download nix tarball {{ nix_version }} + shell: curl -L https://releases.nixos.org/nix/nix-{{ nix_version }}/nix-{{ nix_version }}-x86\_64-linux.tar.xz -o {{ nix_installer_dir }}.tar.xz + - name: Extract nix tarball to /tmp + shell: + cmd: "tar -xvf {{ nix_installer_dir }}.tar.xz" + chdir: /tmp + executable: /bin/bash args: - creates: "{{ nix_bin_path }}" + creates: "{{ nix_installer_dir }}/install" + - name: Install (single-user) nix using classic nix installer with --fallback (i.e., build from source to dynamically pull OpenSSL version) + shell: + cmd: ./install --no-daemon --fallback + chdir: "{{ nix_installer_dir }}" + executable: /bin/bash # - 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 From 026d6d507e582d11190b5a9ba09b475533ce2971 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 23 Oct 2026 12:55:34 -0700 Subject: [PATCH 56/69] remove --fallback flag --- playbook.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 8d9f490..650da80 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -130,9 +130,9 @@ executable: /bin/bash args: creates: "{{ nix_installer_dir }}/install" - - name: Install (single-user) nix using classic nix installer with --fallback (i.e., build from source to dynamically pull OpenSSL version) + - name: Install (single-user) nix using classic nix installer shell: - cmd: ./install --no-daemon --fallback + cmd: ./install --no-daemon chdir: "{{ nix_installer_dir }}" executable: /bin/bash # - name: Add kasm-user to nix-users group From 6ed99c293816ddf887b64ec7292bec2a18879598 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 23 Oct 2026 12:56:01 -0700 Subject: [PATCH 57/69] add --yes for running install script as non-interactive --- playbook.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 650da80..9b20437 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -130,9 +130,9 @@ executable: /bin/bash args: creates: "{{ nix_installer_dir }}/install" - - name: Install (single-user) nix using classic nix installer + - name: Install (single-user) nix using classic nix installer with --yes (run install script non-interactively) shell: - cmd: ./install --no-daemon + cmd: ./install --no-daemon --yes chdir: "{{ nix_installer_dir }}" executable: /bin/bash # - name: Add kasm-user to nix-users group From 62ef4fb15c83ec4ae5a3b9033b7a71a0e2130d8b Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 23 Oct 2026 13:34:50 -0700 Subject: [PATCH 58/69] remove steps for creating /nix directory, installing build tools, & installing sudo --- playbook.yaml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 9b20437..949f169 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -104,23 +104,6 @@ # path: "{{ nix_install_dir }}" # state: directory # mode: '0755' - - name: Create /nix directory with chmod 755 - file: - path: /nix - state: directory - mode: '0755' - - name: Install build dependencies - apt: - name: - - xz-utils # unpacks binary tarball - - build-essential # gcc, make, etc. - - libssl-dev # for OpenSSL - - ca-certificates - update_cache: yes - - name: Install Sudo - apt: - name: sudo - update_cache: yes - name: Download nix tarball {{ nix_version }} shell: curl -L https://releases.nixos.org/nix/nix-{{ nix_version }}/nix-{{ nix_version }}-x86\_64-linux.tar.xz -o {{ nix_installer_dir }}.tar.xz - name: Extract nix tarball to /tmp From 590956ee1042fa08e67d93ffd56f311bb3ecc0b7 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 23 Oct 2026 13:48:44 -0700 Subject: [PATCH 59/69] unset LD_LIBRARY_PATH --- playbook.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbook.yaml b/playbook.yaml index 949f169..107d5a6 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -113,6 +113,8 @@ executable: /bin/bash args: creates: "{{ nix_installer_dir }}/install" + - name: unset LD_LIBRARY_PATH + shell: unset LD_LIBRARY_PATH - name: Install (single-user) nix using classic nix installer with --yes (run install script non-interactively) shell: cmd: ./install --no-daemon --yes From d8fef4ef42d843383e1d7f308557debfd210f09d Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Fri, 23 Oct 2026 17:24:34 -0700 Subject: [PATCH 60/69] set LD_LIBRARY_PATH to "" as environment variable as part of shell command for running nix installation --- playbook.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 107d5a6..2131e1e 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -113,13 +113,15 @@ executable: /bin/bash args: creates: "{{ nix_installer_dir }}/install" - - name: unset LD_LIBRARY_PATH - shell: unset LD_LIBRARY_PATH + # - name: unset LD_LIBRARY_PATH + # shell: unset LD_LIBRARY_PATH - name: Install (single-user) nix using classic nix installer with --yes (run install script non-interactively) shell: cmd: ./install --no-daemon --yes chdir: "{{ nix_installer_dir }}" executable: /bin/bash + environment: + LD_LIBRARY_PATH: "" # - 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 From 5f6047a03d2fd1c10461071b2bc144a9337b8e1f Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 24 Oct 2026 14:46:29 -0700 Subject: [PATCH 61/69] Workaround to shut up installer from complaining about no user in nixbld group rearranges setup/teardown of dev (user) to be able to add to nixbld group --- playbook.yaml | 230 ++++++++++++++++++++++++++++---------------------- 1 file changed, 130 insertions(+), 100 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 2131e1e..6ad3a4b 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -77,14 +77,58 @@ roles: - role: webarchitect609.google_chrome +- + # install sudo for the vs-code role below + hosts: localhost + connection: local + tags: + - install_vscode + + tasks: + - name: Install Sudo + apt: + name: sudo + update_cache: yes + - name: Preserve DONT_PROMPT_WSL_INSTALL in sudoers + lineinfile: + path: "/etc/sudoers" + line: "Defaults env_keep += \"DONT_PROMPT_WSL_INSTALL\"" + when: wsl2_environment + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" + +- +# add dev user to give vs code somewhere to install extensions + hosts: localhost + connection: local + tags: + - install_utilities + - install_vscode + + tasks: + - name: Add dev user + user: + name: dev + uid: 1002 + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" + - # install keychain, git, nix, and @capsulecorplab .vimrc and .gitconfig hosts: localhost connection: local gather_facts: yes tags: - - install_utilities - - install_python_packages + - install_utilities + - install_python_packages vars: nixos_release: "26.05" @@ -115,6 +159,10 @@ creates: "{{ nix_installer_dir }}/install" # - name: unset LD_LIBRARY_PATH # shell: unset LD_LIBRARY_PATH + - name: Create nix build users group # workaround to shut up installer from complaining about no nixbld group + shell: groupadd nixbld + - name: Add dev to nixbld group # workaround to shut up installer from complaining about no user in nixbld group + shell: usermod -aG nixbld dev - name: Install (single-user) nix using classic nix installer with --yes (run install script non-interactively) shell: cmd: ./install --no-daemon --yes @@ -180,6 +228,86 @@ debug: msg: "{{ disk_usage.stdout }}" +- + # install VS Code + hosts: localhost + connection: local + tags: + - install_vscode + + environment: + DONT_PROMPT_WSL_INSTALL: 1 + + tasks: + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" + + 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 + visual_studio_code_settings_overwrite: yes + visual_studio_code_settings: { + "extensions.ignoreRecommendations": true, + "update.mode": "none", + "extensions.autoUpdate": false, + "extensions.autoCheckUpdates": false, + "terminal.integrated.profiles.linux": { + "bash (login)": { + "path": "bash", + "args": ["-l"] + } + }, + "terminal.integrated.defaultProfile.linux": "bash (login)" + } + +- + # Copy VS Code changes to kasm-default-profile + hosts: localhost + connection: local + tags: + - install_vscode + + tasks: + - name: Copy VS Code changes to kasm-default-profile + shell: + cmd: cp -r /home/dev/.config/Code/ /home/kasm-default-profile/.config/Code/ && cp -r /home/dev/.vscode/ /home/kasm-default-profile/.vscode/ + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" + +- + # Clean up (remove) dev user now that things are installed + hosts: localhost + connection: local + tags: + - install_vscode + + tasks: + - name: Remove dev user + user: + name: dev + state: absent + remove: yes + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" + - # install Python packages with pip hosts: localhost @@ -314,103 +442,5 @@ msg: "Yarn Version Error: Expected {{ yarn_version }} | Found {{ installed_yarn_version.stdout }}" when: installed_yarn_version.stdout != yarn_version -- - # install sudo for the vs-code role below - hosts: localhost - connection: local - - tasks: - - name: Install Sudo - apt: - name: sudo - update_cache: yes - - name: Preserve DONT_PROMPT_WSL_INSTALL in sudoers - lineinfile: - path: "/etc/sudoers" - line: "Defaults env_keep += \"DONT_PROMPT_WSL_INSTALL\"" - when: wsl2_environment - - name: Get disk usage - shell: df -h - register: disk_usage - - name: Display disk usage - debug: - msg: "{{ disk_usage.stdout }}" - -- -# add dev user to give vs code somewhere to install extensions - hosts: localhost - connection: local - - tasks: - - name: Add dev user - user: - name: dev - uid: 1002 - - name: Get disk usage - shell: df -h - register: disk_usage - - name: Display disk usage - debug: - msg: "{{ disk_usage.stdout }}" - -- - # install the remainder of the tools - hosts: localhost - connection: local - environment: - DONT_PROMPT_WSL_INSTALL: 1 - - tasks: - - name: Get disk usage - shell: df -h - register: disk_usage - - name: Display disk usage - debug: - msg: "{{ disk_usage.stdout }}" - - 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 - visual_studio_code_settings_overwrite: yes - visual_studio_code_settings: { - "extensions.ignoreRecommendations": true, - "update.mode": "none", - "extensions.autoUpdate": false, - "extensions.autoCheckUpdates": false, - "terminal.integrated.profiles.linux": { - "bash (login)": { - "path": "bash", - "args": ["-l"] - } - }, - "terminal.integrated.defaultProfile.linux": "bash (login)" - } - -- - # Copy VS Code changes to kasm-default-profile and lean up (remove) dev user now that vs code is installed - hosts: localhost - connection: local - tasks: - - name: Copy VS Code changes to kasm-default-profile - shell: - cmd: cp -r /home/dev/.config/Code/ /home/kasm-default-profile/.config/Code/ && cp -r /home/dev/.vscode/ /home/kasm-default-profile/.vscode/ - - name: Remove dev user - user: - name: dev - state: absent - remove: yes - - name: Get disk usage - shell: df -h - register: disk_usage - - name: Display disk usage - debug: - msg: "{{ disk_usage.stdout }}" - # Three dots indicate the end of a YAML document ... From 2af639d920c59b18a270315f451b2c2d208371eb Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 24 Oct 2026 16:08:28 -0700 Subject: [PATCH 62/69] Use nix to install utilities (git, bash completion, keychain, ping) - dynamically unset LD_LIBRARY_PATH per nix-related operation (i.e., installation of nix and nix packages) at buildtime of kasm container - test nix-installed git and keychain versions at buildtime of kasm container - unset LD_LIBRARY_PATH and add nix bin directory to PATH in /etc/profile for system-wide access to nix-installed binaries at runtime of kasm container --- playbook.yaml | 112 +++++++++++++++++++++++--------------------------- 1 file changed, 52 insertions(+), 60 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 6ad3a4b..3399c4f 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -133,36 +133,30 @@ vars: nixos_release: "26.05" nix_version: "2.35.3" - nix_installer_dir: /tmp/nix-{{ nix_version }}-x86_64-linux - git_version: "2.43.0" - keychain_version: "2.8.5" - keychain_version_expected: "{{ keychain_version }}.." + nix_bin_dir: /nix/var/nix/profiles/default/bin + nix_bin_path: "{{ nix_bin_dir }}/nix" + nix_install_dir: /home/kasm-default-profile/install_files/ + nix_installer_dir: "{{ nix_install_dir }}/nix-{{ nix_version }}-x86_64-linux" + git_version: "2.54.0" + keychain_version: "2.9.8" + keychain_version_expected: "{{ keychain_version }}." tasks: - # - name: Install nix-bin # see https://moonpiedumplings.github.io/projects/setting-up-kasm/#customized-kasm-images - # apt: - # name: nix-bin - # update_cache: yes - # - name: Create {{ nix_install_dir }} directory with chmod 755 - # file: - # path: "{{ nix_install_dir }}" - # state: directory - # mode: '0755' - name: Download nix tarball {{ nix_version }} shell: curl -L https://releases.nixos.org/nix/nix-{{ nix_version }}/nix-{{ nix_version }}-x86\_64-linux.tar.xz -o {{ nix_installer_dir }}.tar.xz - - name: Extract nix tarball to /tmp + - name: Extract nix tarball to {{ nix_install_dir }} shell: cmd: "tar -xvf {{ nix_installer_dir }}.tar.xz" - chdir: /tmp + chdir: "{{ nix_install_dir }}" executable: /bin/bash args: creates: "{{ nix_installer_dir }}/install" - # - name: unset LD_LIBRARY_PATH - # shell: unset LD_LIBRARY_PATH - name: Create nix build users group # workaround to shut up installer from complaining about no nixbld group shell: groupadd nixbld - name: Add dev to nixbld group # workaround to shut up installer from complaining about no user in nixbld group shell: usermod -aG nixbld dev + - name: Unset LD_LIBRARY_PATH system-wide + shell: printf "\nunset LD_LIBRARY_PATH\n" >> /etc/profile && . /etc/profile - name: Install (single-user) nix using classic nix installer with --yes (run install script non-interactively) shell: cmd: ./install --no-daemon --yes @@ -170,49 +164,47 @@ executable: /bin/bash environment: LD_LIBRARY_PATH: "" - # - 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: Add {{ nix_bin_dir }} to PATH system-wide + shell: printf "\nexport PATH="{{ nix_bin_dir }}:$PATH"\n" >> /etc/profile && . /etc/profile + - name: Install git {{ git_version }} with nix + shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#git --extra-experimental-features 'nix-command flakes'" + environment: + LD_LIBRARY_PATH: "" + - name: Install Git Bash Completion + shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#bash-completion --extra-experimental-features 'nix-command flakes'" + environment: + LD_LIBRARY_PATH: "" + - name: Install Keychain + shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#keychain --extra-experimental-features 'nix-command flakes'" + environment: + LD_LIBRARY_PATH: "" + - name: install ping + shell: "{{ nix_bin_path }} profile install nixpkgs#unixtools.ping --extra-experimental-features 'nix-command flakes'" + environment: + LD_LIBRARY_PATH: "" + - name: Get keychain version + shell: + cmd: "{{ nix_bin_dir }}/keychain -V 2> >(grep -i keychain) 2> >(sed 's/[[:alpha:]|(|[:space:]]//g') | fgrep '*' | sed 's/[*~://]//g'" + executable: /bin/bash + register: installed_keychain_version + environment: + LD_LIBRARY_PATH: "" + - name: Get git version + shell: "{{ nix_bin_dir }}/git version | sed 's/[[:alpha:]|(|[:space:]]//g'" + register: installed_git_version + environment: + LD_LIBRARY_PATH: "" + - 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 From 585ed4edfa5e7a6ed04ff86c82c1516f728e8862 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 24 Oct 2026 19:51:44 -0700 Subject: [PATCH 63/69] replace apt w/ nix installed sudo (used for installing vs code) --- playbook.yaml | 55 +++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 3399c4f..651bb7d 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -77,30 +77,6 @@ roles: - role: webarchitect609.google_chrome -- - # install sudo for the vs-code role below - hosts: localhost - connection: local - tags: - - install_vscode - - tasks: - - name: Install Sudo - apt: - name: sudo - update_cache: yes - - name: Preserve DONT_PROMPT_WSL_INSTALL in sudoers - lineinfile: - path: "/etc/sudoers" - line: "Defaults env_keep += \"DONT_PROMPT_WSL_INSTALL\"" - when: wsl2_environment - - name: Get disk usage - shell: df -h - register: disk_usage - - name: Display disk usage - debug: - msg: "{{ disk_usage.stdout }}" - - # add dev user to give vs code somewhere to install extensions hosts: localhost @@ -129,6 +105,7 @@ tags: - install_utilities - install_python_packages + - install_vscode vars: nixos_release: "26.05" @@ -220,6 +197,36 @@ debug: msg: "{{ disk_usage.stdout }}" +- + # install sudo for the vs-code role below + hosts: localhost + connection: local + tags: + - install_vscode + + vars: + nixos_release: "26.05" + nix_version: "2.35.3" + nix_bin_dir: /nix/var/nix/profiles/default/bin + nix_bin_path: "{{ nix_bin_dir }}/nix" + + tasks: + - name: Install sudo + shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#sudo --extra-experimental-features 'nix-command flakes'" + environment: + LD_LIBRARY_PATH: "" + - name: Preserve DONT_PROMPT_WSL_INSTALL in sudoers + lineinfile: + path: "/etc/sudoers" + line: "Defaults env_keep += \"DONT_PROMPT_WSL_INSTALL\"" + when: wsl2_environment + - name: Get disk usage + shell: df -h + register: disk_usage + - name: Display disk usage + debug: + msg: "{{ disk_usage.stdout }}" + - # install VS Code hosts: localhost From 0e5d8980fbd75a4c7c39ef0eb037f11fca7bbf3c Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 24 Oct 2026 19:54:26 -0700 Subject: [PATCH 64/69] Update ansible-galaxy install of playbook with install_vscode tag in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 32afa77..4184eb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -vvvv -i,localhost playbook.yaml --tags "install_utilities" && rm -f ./*.yaml +RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -vvvv -i,localhost playbook.yaml --tags "install_vscode" && 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 From ebc1cf3cdbe8032f09a1392d8146ac0df7830615 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 24 Oct 2026 21:30:13 -0700 Subject: [PATCH 65/69] Replace apt with nix installed python, pip, & pip-installed python packages - Installs python 3.13 & pip from nixpkgs - Tests pint version against expected version --- playbook.yaml | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 651bb7d..84defd1 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -84,6 +84,7 @@ tags: - install_utilities - install_vscode + - install_python_packages tasks: - name: Add dev user @@ -206,7 +207,6 @@ vars: nixos_release: "26.05" - nix_version: "2.35.3" nix_bin_dir: /nix/var/nix/profiles/default/bin nix_bin_path: "{{ nix_bin_dir }}/nix" @@ -315,24 +315,45 @@ tags: - install_python_packages + vars: + nixos_release: "26.05" + nix_bin_dir: /nix/var/nix/profiles/default/bin + nix_bin_path: "{{ nix_bin_dir }}/nix" + pint_version: 0.26.2 + tasks: - - name: Update OS to point python to python3 - apt: - name: python-is-python3 - update_cache: yes - - name: Install pip for python3 with Apt - apt: - name: python3-pip - update_cache: yes + - name: Install python3 with nix + shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#python3 --extra-experimental-features 'nix-command flakes'" + environment: + LD_LIBRARY_PATH: "" + - name: Install pip with nix + shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#python313Packages.pip --extra-experimental-features 'nix-command flakes'" + environment: + LD_LIBRARY_PATH: "" - name: Install python packages with pip pip: break_system_packages: true name: - - pint + - pint=={{ pint_version }} - voila - notebook==6.5.7 - - jupyterlab==3.6.8 + # - jupyterlab==3.6.8 extra_args: --ignore-installed + environment: + LD_LIBRARY_PATH: "" + PATH: "{{ nix_bin_dir }}:$PATH" + - name: Get Pint version + shell: "{{ nix_bin_dir }}/python -c 'import pint; print(pint.__version__)'" + register: installed_pint_version + environment: + LD_LIBRARY_PATH: "" + - name: Display Pint versions + debug: + msg: "pint = {{ installed_pint_version.stdout }}" + - name: Test Pint version + fail: + msg: "Pint Version Error: Expected {{ pint_version }} | Found {{ installed_pint_version.stdout }}" + when: installed_pint_version.stdout != pint_version - name: Get disk usage shell: df -h register: disk_usage From 80daa23883d985d01f45c09ca83304ae75e17f29 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 24 Oct 2026 21:33:04 -0700 Subject: [PATCH 66/69] set ansible playbook tag to install_python_packages --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4184eb4..64c3493 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -vvvv -i,localhost playbook.yaml --tags "install_vscode" && rm -f ./*.yaml +RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -vvvv -i,localhost playbook.yaml --tags "install_python_packages" && 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 From 6b80b3f8435fbd4d60382c4b807a2de89447bfe8 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 24 Oct 2026 21:48:56 -0700 Subject: [PATCH 67/69] Update git, keychain, python, & pint version in README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fcb03ec..77e076e 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ This repo provides a workspace for the [LearnTeachCode resource page](https://gi - yarn v4.3.1 - oclif v4.14.6 - Utilities - - git v2.43.0 with @capsulecorplab .gitconfig - - [Keychain](https://www.funtoo.org/Keychain) v2.8.5 + - git v2.54.0 with @capsulecorplab .gitconfig + - [Keychain](https://www.funtoo.org/Keychain) v2.9.8 - Vim (pre-installed) with @capsulecorplab [vimrc](https://gist.github.com/capsulecorplab/495058e7a57ed8adaed3c40c80d09739#file-vimrc) -- Python 3.12.3 (part of the image template) with the following packages (not part of the image template) +- Python 3.13 - pip - - [Pint](https://pint.readthedocs.io/en/stable/) + - [Pint](https://pint.readthedocs.io/en/stable/) v0.26.2 - VS Code with the following extensions (note, auto-updates are disabled) - [Python extension by Microsoft](https://marketplace.visualstudio.com/items?itemName=ms-python.python) - [Dendron](https://marketplace.visualstudio.com/items?itemName=dendron.dendron) From cfad3166221fd67bba8055da28596325ac4d23d2 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sat, 24 Oct 2026 21:49:33 -0700 Subject: [PATCH 68/69] Set tag back to "all" for ansible playbook in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 64c3493..1b65d5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -vvvv -i,localhost playbook.yaml --tags "install_python_packages" && 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 From c03ecf7dbcd7b30e69912b1184851e737653db84 Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Sun, 25 Oct 2026 14:09:26 -0700 Subject: [PATCH 69/69] Update nixpkgs branch from release-26.05 to nixos-26.05 (stable) --- playbook.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 84defd1..3fd6686 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -109,8 +109,8 @@ - install_vscode vars: - nixos_release: "26.05" nix_version: "2.35.3" + nixpkgs_branch: "nixos-26.05" nix_bin_dir: /nix/var/nix/profiles/default/bin nix_bin_path: "{{ nix_bin_dir }}/nix" nix_install_dir: /home/kasm-default-profile/install_files/ @@ -145,15 +145,15 @@ - name: Add {{ nix_bin_dir }} to PATH system-wide shell: printf "\nexport PATH="{{ nix_bin_dir }}:$PATH"\n" >> /etc/profile && . /etc/profile - name: Install git {{ git_version }} with nix - shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#git --extra-experimental-features 'nix-command flakes'" + shell: "{{ nix_bin_path }} profile install nixpkgs/{{ nixpkgs_branch }}#git --extra-experimental-features 'nix-command flakes'" environment: LD_LIBRARY_PATH: "" - name: Install Git Bash Completion - shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#bash-completion --extra-experimental-features 'nix-command flakes'" + shell: "{{ nix_bin_path }} profile install nixpkgs/{{ nixpkgs_branch }}#bash-completion --extra-experimental-features 'nix-command flakes'" environment: LD_LIBRARY_PATH: "" - name: Install Keychain - shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#keychain --extra-experimental-features 'nix-command flakes'" + shell: "{{ nix_bin_path }} profile install nixpkgs/{{ nixpkgs_branch }}#keychain --extra-experimental-features 'nix-command flakes'" environment: LD_LIBRARY_PATH: "" - name: install ping @@ -206,13 +206,13 @@ - install_vscode vars: - nixos_release: "26.05" + nixpkgs_branch: "nixos-26.05" nix_bin_dir: /nix/var/nix/profiles/default/bin nix_bin_path: "{{ nix_bin_dir }}/nix" tasks: - name: Install sudo - shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#sudo --extra-experimental-features 'nix-command flakes'" + shell: "{{ nix_bin_path }} profile install nixpkgs/{{ nixpkgs_branch }}#sudo --extra-experimental-features 'nix-command flakes'" environment: LD_LIBRARY_PATH: "" - name: Preserve DONT_PROMPT_WSL_INSTALL in sudoers @@ -316,18 +316,18 @@ - install_python_packages vars: - nixos_release: "26.05" + nixpkgs_branch: "nixos-26.05" nix_bin_dir: /nix/var/nix/profiles/default/bin nix_bin_path: "{{ nix_bin_dir }}/nix" pint_version: 0.26.2 tasks: - name: Install python3 with nix - shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#python3 --extra-experimental-features 'nix-command flakes'" + shell: "{{ nix_bin_path }} profile install nixpkgs/{{ nixpkgs_branch }}#python3 --extra-experimental-features 'nix-command flakes'" environment: LD_LIBRARY_PATH: "" - name: Install pip with nix - shell: "{{ nix_bin_path }} profile install nixpkgs/release-{{ nixos_release }}#python313Packages.pip --extra-experimental-features 'nix-command flakes'" + shell: "{{ nix_bin_path }} profile install nixpkgs/{{ nixpkgs_branch }}#python313Packages.pip --extra-experimental-features 'nix-command flakes'" environment: LD_LIBRARY_PATH: "" - name: Install python packages with pip