1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
Commit graph

9 commits

Author SHA1 Message Date
Tyler Miller
861af0fc94
fix(launchd): improve StartCalendarInterval
Stricter launchd -> StartCalendarInterval type:

- Verify that the integers passed to `Minute`, `Hour`, etc. are within
  range.

- When provided, the value for StartCalendarInterval must be a non-empty
  list of calendar intervals and must not contain duplicates entries
  (throw an error otherwise).

- For increased flexibility and backwards-compatibility, allow an
  attrset to be passed as well (which will be type-checked and is
  functionally equivalent to passing a singleton list). Allowing an
  attrset or list is precisely in-line with what `launchd.plist(5)`
  accepts for StartCalendarInterval.

Migrate `nix.gc.interval` and `nix.optimise.interval` over to use this
new type, and update their defaults to run weekly instead of daily.

Create `modules/launchd/types.nix` file for easier/modular use of
launchd types needed in multiple files.

Documentation:

- Update and improve wording/documentation of launchd's
  `StartCalendarInterval`.

- Improve wording/documentation of `nix.gc.interval` and
  `nix.optimise.interval` ("time interval" can be misleading as it's
  actually a "calendar interval"; e.g. `{ Hour = 3; Minute = 15;}`
  runs daily, not every 3.25 hours).
2024-06-09 11:20:15 -07:00
Weijia Wang
def1e23be8 treewide: remove lib.mdDoc 2024-04-19 04:05:50 +02:00
Andrew Marshall
4a7da05c1e Fix spelling 2023-07-10 08:30:15 -04:00
Emily
e65131e69c treewide: convert all option docs to Markdown
This process was automated by [my fork of `nix-doc-munge`]; thanks
to @pennae for writing this tool! It automatically checks that the
resulting documentation doesn't change, although my fork loosens
this a little to ignore some irrelevant whitespace and typographical
differences.

As of this commit there is no DocBook remaining in the options
documentation.

You can play along at home if you want to reproduce this commit:

    $ NIX_PATH=nixpkgs=flake:nixpkgs/c1bca7fe84c646cfd4ebf3482c0e6317a0b13f22 \
      nix shell nixpkgs#coreutils \
      -c find . -name '*.nix' \
      -exec nix run github:emilazy/nix-doc-munge/0a7190f600027bf7baf6cb7139e4d69ac2f51062 \
      {} +

[my fork of `nix-doc-munge`]: https://github.com/emilazy/nix-doc-munge
2023-06-24 10:48:55 +01:00
Malo Bourgon
8e2c71d1ca Tweak nix.gc module to more closely match NixOS module 2022-08-16 17:41:13 -07:00
Malo Bourgon
c027fb5ee5 Update nix.gc module with same indenting/formatting as NixOS module 2022-08-16 17:41:13 -07:00
Daiderd Jordan
8c2b25e60d
nix: fix useDaemon conditions
The nix.useDaemon option enables using a multi-user install without
managing the nix installation with nix-darwin.  The following checks
apply to both cases.
2019-07-01 21:24:29 +02:00
Daiderd Jordan
f5116b0f4d
nix-gc: add user option
This configures the user that runs the garbage collector, particularly
useful for single-user installs.  Otherwise it runs as root resulting in
permission issues afterwards.
2019-01-02 20:24:00 +01:00
Daiderd Jordan
d049c7b97a
hydra: use nix.gc.automatic 2017-07-17 21:42:27 +02:00