From 97a38c2631f5c1a8eb5dde74198141e30f00adae Mon Sep 17 00:00:00 2001 From: Sean Marquez Date: Wed, 1 May 2024 23:40:17 -0700 Subject: [PATCH 01/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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/17] 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