1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-09-11 12:49:18 +03:00
nix-darwin/tests/services-activate-system-changed-label-prefix.nix
2020-04-14 15:01:37 -07:00

16 lines
563 B
Nix

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