1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
nix-darwin/tests/services-activate-system.nix
Michael Hoang dae702993d activate-system: remove enable option
Disabling this is not supported as `/run` gets cleared out on every
reboot so it is necessary for ensuring that the `/run/current-system`
symlink exists.
2024-11-15 14:10:48 +11:00

12 lines
463 B
Nix

{ config, pkgs, ... }:
{
test = ''
echo checking activation service in /Library/LaunchDaemons >&2
grep "org.nixos.activate-system" ${config.out}/Library/LaunchDaemons/org.nixos.activate-system.plist
echo checking activation of /run/current-system >&2
script=$(cat ${config.out}/Library/LaunchDaemons/org.nixos.activate-system.plist | awk -F'[< ]' '$6 ~ "^/nix/store/.*" {print $6}')
grep "ln -sfn .* /run/current-system" "$script"
'';
}