Pārlūkot izejas kodu

ensure configuration.nix is updated as part of kodi-config role

Blaine Story 2 gadi atpakaļ
vecāks
revīzija
fc777ea69d

+ 5 - 0
roles/kodi-config/handlers/main.yml

@@ -0,0 +1,5 @@
+---
+- name: Rebuild nix config
+  ansible.builtin.shell:
+    cmd: nixos-rebuild boot
+

+ 12 - 0
roles/kodi-config/tasks/main.yml

@@ -1,4 +1,16 @@
 ---
+- name: Ensure nix config is up to date
+  ansible.builtin.template:
+    src: configuration.nix.j2
+    dest: /etc/nixos/configuration.nix
+    owner: root
+    group: root
+    mode: '0644'
+  notify:
+    - Rebuild nix config
+  tags:
+    - nix
+
 - name: Copy kodi configuration files
   ansible.builtin.template:
     src: "{{ item }}.j2"