blob: c5bb0832e0a6dd76accd2c7b117da37e3d574188 (
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
33
34
35
36
37
38
39
|
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
if node[:profile] == "private"
execute "rustup: install nightly toolchain" do
command "rustup toolchain install nightly"
not_if "rustup toolchain list | grep nightly"
end
end
|