diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2019-01-04 00:50:14 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2019-01-04 00:50:14 +0100 |
| commit | 462ec30cb3d42999ca2b3b452e356e7fef9de416 (patch) | |
| tree | 0d0087914cfb9b0ee66edce2ecffd5954842efe4 /tests/checks-nix-gc.nix | |
| parent | 458d09882eda36591da67521dce80b1874b776d8 (diff) | |
checks: add test for nix-gc user validation
Diffstat (limited to 'tests/checks-nix-gc.nix')
| -rw-r--r-- | tests/checks-nix-gc.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/checks-nix-gc.nix b/tests/checks-nix-gc.nix new file mode 100644 index 0000000..fde6211 --- /dev/null +++ b/tests/checks-nix-gc.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: + +let + nix = pkgs.runCommand "nix-0.0.0" {} "mkdir -p $out"; +in + +{ + nix.gc.automatic = true; + nix.package = nix; + + test = '' + echo checking nix-gc validation >&2 + grep "nix.gc.user = " ${config.out}/activate-user + + echo checking nix-gc service in /Library/LaunchDaemons >&2 + grep "<string>org.nixos.nix-gc</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist + ! grep "<key>UserName</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist + ''; +} |
