2024-10-01 00:51:46 +02:00
|
|
|
---
|
|
|
|
# Configuring the nix installation.
|
|
|
|
|
2024-10-15 20:26:27 +02:00
|
|
|
- name: Manipulation over {{ additional_user }}
|
|
|
|
when: ansible_user_id == 'root'
|
|
|
|
tags:
|
|
|
|
- nix
|
|
|
|
- nix-config
|
|
|
|
block:
|
|
|
|
|
|
|
|
- name: Adding user to nix-users
|
|
|
|
ansible.builtin.user:
|
|
|
|
name: "{{ additional_user }}"
|
|
|
|
groups: nix-users
|
|
|
|
append: true
|
|
|
|
become_user: root
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Adding configuration to local user
|
|
|
|
ansible.builtin.file:
|
|
|
|
src: "{{ dotfdir }}/nix"
|
|
|
|
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.config/nix"
|
|
|
|
state: link
|
|
|
|
become_user: "{{ additional_user }}"
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Manipulation over {{ ansible_user_id }}
|
|
|
|
when: ansible_user_id != 'root'
|
|
|
|
tags:
|
|
|
|
- nix
|
|
|
|
- nix-config
|
|
|
|
block:
|
|
|
|
|
|
|
|
- name: Adding user to nix-users
|
|
|
|
ansible.builtin.user:
|
2024-10-15 20:30:18 +02:00
|
|
|
name: "{{ ansible_user_id }}"
|
2024-10-15 20:26:27 +02:00
|
|
|
groups: nix-users
|
|
|
|
append: true
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Adding configuration to local user
|
|
|
|
ansible.builtin.file:
|
|
|
|
src: "{{ dotfdir }}/nix"
|
|
|
|
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.config/nix"
|
|
|
|
state: link
|