diff --git a/modules/lib/darwin.nix b/modules/lib/darwin.nix index 070cf2153..8c05a3d97 100644 --- a/modules/lib/darwin.nix +++ b/modules/lib/darwin.nix @@ -63,12 +63,12 @@ let intervalsString = lib.concatStringsSep ", " intervals; assertInterval = option: interval: pkgs: { - assertion = (!pkgs.stdenv.isDarwin) || (lib.elem interval intervals); - message = "On Darwin ${option} must be one of: ${intervalsString}."; + assertion = pkgs.stdenv.isDarwin -> lib.elem interval intervals; + message = "On Darwin, ${option} must be one of: ${intervalsString}."; }; intervalDocumentation = '' - On Darwin it must be one of: ${intervalsString}, which are implemented as defined in {manpage}`systemd.time(7)`. + On Darwin, it must be one of: ${intervalsString}, which are implemented as defined in {manpage}`systemd.time(7)`. ''; in { diff --git a/tests/modules/services/borgmatic/darwin/frequency-assertion.nix b/tests/modules/services/borgmatic/darwin/frequency-assertion.nix index f8ebb0c22..64b1a91d0 100644 --- a/tests/modules/services/borgmatic/darwin/frequency-assertion.nix +++ b/tests/modules/services/borgmatic/darwin/frequency-assertion.nix @@ -5,6 +5,6 @@ }; test.asserts.assertions.expected = [ - "On Darwin services.borgmatic.frequency must be one of: hourly, daily, weekly, monthly, semiannually, annually." + "On Darwin, services.borgmatic.frequency must be one of: hourly, daily, weekly, monthly, semiannually, annually." ]; } diff --git a/tests/modules/services/home-manager-auto-expire/darwin/frequency-assertion.nix b/tests/modules/services/home-manager-auto-expire/darwin/frequency-assertion.nix index 568d20439..90212448c 100644 --- a/tests/modules/services/home-manager-auto-expire/darwin/frequency-assertion.nix +++ b/tests/modules/services/home-manager-auto-expire/darwin/frequency-assertion.nix @@ -5,6 +5,6 @@ }; test.asserts.assertions.expected = [ - "On Darwin services.home-manager.autoExpire.frequency must be one of: hourly, daily, weekly, monthly, semiannually, annually." + "On Darwin, services.home-manager.autoExpire.frequency must be one of: hourly, daily, weekly, monthly, semiannually, annually." ]; } diff --git a/tests/modules/services/nix-gc/darwin/darwin-nix-gc-interval-assertion.nix b/tests/modules/services/nix-gc/darwin/darwin-nix-gc-interval-assertion.nix index f3bedb68d..e1e22d0a7 100644 --- a/tests/modules/services/nix-gc/darwin/darwin-nix-gc-interval-assertion.nix +++ b/tests/modules/services/nix-gc/darwin/darwin-nix-gc-interval-assertion.nix @@ -5,6 +5,6 @@ }; test.asserts.assertions.expected = [ - "On Darwin nix.gc.dates.* must be one of: hourly, daily, weekly, monthly, semiannually, annually." + "On Darwin, nix.gc.dates.* must be one of: hourly, daily, weekly, monthly, semiannually, annually." ]; }