26 lines
585 B
YAML
26 lines
585 B
YAML
|
# SPDX-FileCopyrightText: Copyright (c) 2021 Ableton AG
|
||
|
# SPDX-License-Identifier: MIT
|
||
|
---
|
||
|
- name: Ensure nix directory exists
|
||
|
become: true
|
||
|
file:
|
||
|
path: "/nix"
|
||
|
owner: "earne"
|
||
|
state: directory
|
||
|
mode: "0755"
|
||
|
register: nix_directory
|
||
|
|
||
|
- name: Install nix
|
||
|
block:
|
||
|
- name: Download installer script
|
||
|
get_url:
|
||
|
url: "https://nixos.org/nix/install"
|
||
|
dest: "/tmp/install_nix.sh"
|
||
|
mode: "0755"
|
||
|
|
||
|
- name: Run installer script
|
||
|
become: true
|
||
|
become_user: "earne"
|
||
|
command: "/tmp/install_nix.sh"
|
||
|
when: nix_directory is changed
|