blob: 06d2c3ab89a6604b7c5913d9969cbafa3a881e9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
http_request ".bootstrap/nix-install" do
url "https://nixos.org/nix/install"
end
execute "nix-install" do
command "sh .bootstrap/nix-install --daemon"
not_if "test -d /nix"
end
file "/etc/nix/nix.conf" do
action :edit
block do |content|
content + "experimental-features = nix-command flakes\n"
end
not_if "grep -q 'nix-command flakes' /etc/nix/nix.conf"
end
home = ENV['HOME']
directory "#{home}/.local/state/nix/profiles"
# XDG Base Directories
directory "#{home}/.config"
directory "#{home}/.cache"
directory "#{home}/.local/share"
directory "#{home}/.local/state"
directory "#{home}/.config/skk"
execute "home-manager switch" do
command "nix run 'nixpkgs#home-manager' -- switch --flake '.##{node[:name]}'"
end
|