Skip to content

Refactor playbook to use nix #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apt update && apt -y install software-properties-common && add-apt-repositor

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

# Custom Desktop Background - replace bg_custom.png on disk with your own background image
COPY ./bg_fairy_penguins_1600x800.png /usr/share/backgrounds/bg_default.png
Expand Down
26 changes: 26 additions & 0 deletions playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,32 @@
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
Expand Down
Loading