✨ flake / nix command support
This commit is contained in:
parent
9891755ed9
commit
43ccd55bb3
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user