Added Nix
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
{{- $shell := promptBoolOnce . "features.shell" "Do you want to install the Fish shell" true }}
|
||||
{{- $git := promptBoolOnce . "features.git" "Do you want to install Git" true }}
|
||||
{{- $editor := promptBoolOnce . "features.editor" "Do you want to install Neovim" true }}
|
||||
{{- $nix := promptBoolOnce . "features.editor" "Do you want to install the Nix package manager" true }}
|
||||
|
||||
[data]
|
||||
email = {{ $email | quote }}
|
||||
@@ -13,3 +14,4 @@ git_name = {{ $git_name | quote }}
|
||||
shell = {{ $shell }}
|
||||
git = {{ $git }}
|
||||
editor = {{ $editor }}
|
||||
nix = {{ $nix }}
|
||||
|
||||
@@ -10,3 +10,7 @@
|
||||
{{- if not .features.editor }}
|
||||
.config/nvim
|
||||
{{- end }}
|
||||
|
||||
{{- if not .features.nix }}
|
||||
.config/nix
|
||||
{{- end }}
|
||||
|
||||
@@ -5,3 +5,7 @@ abbr --add --position command l ls -lAh
|
||||
abbr --add --position command vim nvim
|
||||
abbr --add --position command vi nvim
|
||||
{{- end }}
|
||||
|
||||
{{- if .features.nix }}
|
||||
abbr --add --position command nd 'nix develop --command $SHELL'
|
||||
{{- end }}
|
||||
|
||||
2
home/private_dot_config/nix/nix.conf
Normal file
2
home/private_dot_config/nix/nix.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
# Enable Nix flakes
|
||||
experimental-features = nix-command flakes
|
||||
@@ -29,3 +29,5 @@
|
||||
when: features.git == true
|
||||
- role: editor
|
||||
when: features.editor == true
|
||||
- role: nix
|
||||
when: features.nix == true
|
||||
|
||||
12
setup-script/roles/nix/tasks/main.yml
Normal file
12
setup-script/roles/nix/tasks/main.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- name: Install Nix on Arch
|
||||
become: true
|
||||
ansible.builtin.pacman:
|
||||
name: nix
|
||||
when: chezmoi.osRelease.id == "arch"
|
||||
|
||||
- name: Start the Nix daemon
|
||||
become: true
|
||||
ansible.builtin.systemd_service:
|
||||
name: nix-daemon
|
||||
enabled: true
|
||||
state: started
|
||||
Reference in New Issue
Block a user