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