mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-09-11 12:49:18 +03:00
add test for activate-system service
This commit is contained in:
parent
f850f97550
commit
1d5c5266bb
@ -88,6 +88,8 @@ let
|
|||||||
examples.lnl = genExample ./modules/examples/lnl.nix;
|
examples.lnl = genExample ./modules/examples/lnl.nix;
|
||||||
examples.simple = genExample ./modules/examples/simple.nix;
|
examples.simple = genExample ./modules/examples/simple.nix;
|
||||||
|
|
||||||
|
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;
|
||||||
|
|
||||||
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
||||||
|
|
||||||
tests.system-packages = makeTest ./tests/system-packages.nix;
|
tests.system-packages = makeTest ./tests/system-packages.nix;
|
||||||
|
14
tests/services-activate-system.nix
Normal file
14
tests/services-activate-system.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.activate-system.enable = true;
|
||||||
|
|
||||||
|
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'[< ]' '$3 ~ "^/nix/store/.*" {print $3}')
|
||||||
|
grep "ln -sfn .* /run/current-system" "$script"
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user