flake / nix command support

This commit is contained in:
James Walker 2022-01-06 20:51:22 -05:00
parent 9891755ed9
commit 43ccd55bb3
Signed by: walkah
GPG Key ID: 3C127179D6086E93

View File

@ -21,6 +21,9 @@
# Auto upgrade nix package and the daemon service. # Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
nix.package = pkgs.nix; nix.package = pkgs.nix;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
nix.distributedBuilds = true; nix.distributedBuilds = true;
nix.buildMachines = [{ nix.buildMachines = [{
@ -63,14 +66,16 @@
}; };
}; };
system.activationScripts.applications.text = pkgs.lib.mkForce ('' system.activationScripts.applications.text = pkgs.lib.mkForce (
rm -rf /Applications/Nix ''
mkdir -p /Applications/Nix rm -rf /Applications/Nix
for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do mkdir -p /Applications/Nix
src="$(/usr/bin/stat -f%Y "$app")" for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do
cp -r "$src" /Applications/Nix src="$(/usr/bin/stat -f%Y "$app")"
done cp -r "$src" /Applications/Nix
''); done
''
);
# Used for backwards compatibility, please read the changelog before changing. # Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog # $ darwin-rebuild changelog