summaryrefslogtreecommitdiff
path: root/modules/services
AgeCommit message (Collapse)Author
2024-07-27github-runners: move `workDir` outside of `/run`Michael Hoang
As `/run` gets recreated every reboot and we can't specify dependencies for launchd, creating the `workDir` every reboot will require extra complexity with a separate daemon that runs as `root` otherwise it won't have sufficient privileges. As we clean the `workDir` when the service first starts anyway, it ends up being the same.
2024-07-27Revert "github-runnners: fix workDir missing on reboot"Michael Hoang
This reverts commit fe99aa9699e7dd4ce6a81a8a623d010cedbe7eef.
2024-07-23github-runnners: fix workDir missing on rebootMichael Hoang
2024-07-22chore: removing deprecations for 25.05 nixNikola Milojević
2024-07-21Merge pull request #973 from amsynist/modules/services/jankybordersEmily
module : `jankyborders` for window borders Configuration
2024-07-21module: add jankyborders servicePrav!n
- Added the jankyborders service. - Introduced changes for whitelist and blacklist options and assertions. - emoved path reference from launchd argument. - Corrected missing trailing newline in default.nix.
2024-07-08nextdns: fix argument handlingHenrique Goncalves
2024-07-01chore: remove mkpackageoptionmd deprecationNikola Milojević
2024-06-09fix(launchd): improve `StartCalendarInterval`Tyler Miller
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-05-21hercules-ci-agent: fix crash calling `security`zowoq
this applies the same fix that was used for the cachix agent in e043606b50526f4b9eb14d983f406acec9548962
2024-05-16cachix-agent: fix crash calling `security`Sander
One of cachix-agent's dependencies, `hs-certificate`, makes calls to `security`. This lives in `/usr/bin`, which isn't available from launchd. This commit makes the system paths available to cachix-agent. Fixes #924.
2024-04-24nix-daemon: increase SoftResourceLimits.NumberOfFileszowoq
1048576 matches the nixos/nix plist https://github.com/NixOS/nix/blob/e3a4e40a354e1c2d177541d24d6a86a001fa87c7/misc/launchd/org.nixos.nix-daemon.plist.in#L29
2024-04-19treewide: remove lib.mdDocWeijia Wang
2024-03-27Add `nix.optimise` moduleMalo Bourgon
2024-03-13Merge pull request #725 from mitchmindtree/trezordMichael Hoang
2024-03-04Merge pull request #767 from jmmaloney4/masterMichael Hoang
a few fixes for ipfs module
2024-02-28github-runners: adapt to NixOS moduleVincent Haupert
While #859 added basic support for configuring GitHub runners through nix-darwin, it did not yet support all of the options the NixOS module offers. I am aware that this is a rather big overhaul. I think, however, that it's worth it: - Copies the `options.nix` from the [NixOS module] with only minor adaptations. This should help to keep track of any changes to it. - Respect the `workDir` config option. So far, the implementation didn't even read the value of the option. - Allow configuring a custom user and group. If both are `null`, nix-darwin manages the `_github-runner` user shared among all instances. Take care of creating your own users if that's not what you want. - Also creates the necessary directories for state, logs and the working directory (unless `workDir != null`). It uses the following locations: * state: `/var/lib/github-runners/${name}` * logs: `/var/log/github-runners/${name}` * work: The value of `workDir` or `/var/run/github-runners/${name}` if (`workDir == null`). We have to create the logs directory before starting the service since launchd expects that the `Standard{Error,Out}Path` exist. We do this by prepending to [`system.activationScripts.launchd.text`]. All directories belong to the configured `user` and `group`. - Warn if a `tokenFile` points to the Nix store. [NixOS module]: https://github.com/NixOS/nixpkgs/blob/3c30c56/nixos/modules/services/continuous-integration/github-runner/options.nix [`system.activationScripts.launchd.text`]: https://github.com/LnL7/nix-darwin/blob/bbde06b/modules/system/launchd.nix#L99-L123
2024-02-18Merge pull request #859 from yaxitech/github-runnerDomen Kožar
github-runners: init module
2024-02-01services/yabai: Remove IFDNikodem Rabuliński
enableScriptingAddition no longer triggers IFD by using runCommand to generate sudoers.d/yabai, instead of builtins.hashFile and interpolating the string in nix.
2024-01-30Merge pull request #780 from kalbasit/update_yabai_sa_scriptMichael Hoang
services/yabai: Remove --check-sa and --install-sa flags
2024-01-22github-runners: init moduleVincent Haupert
Adds a new module which allows to configure multiple GitHub self-hosted runners on Darwin. The module is heavily inspired by the nixpkgs NixOS module. Its implementation differs in some ways: - There's currently no way to configure the user/group which runs the runner. All configured runners share the same user and group. - No automatic cleanup. - No advanced sandboxing apart from user/group isolation
2023-11-18[yabai] Configure scripting additionRichard Huang
Allow admins to execute `yabai --load-sa` as the root user without having to enter a password
2023-11-11Add security.pki.installCACerts configYacine Hmito
Made is possible to disable the management of /etc/ssl/certs/ca-certificates.crt by Nix darwin.
2023-09-14services/yabai: Remove --check-sa and --install-sa flagsWael M. Nasreddine
The --check-sa and --install-sa flags were removed in favor of --load-sa as of version 5.0.0 of Yabai. https://github.com/koekeishiya/yabai/blob/ee0137f37ded4309cb40b7f38817b5abd90fb592/CHANGELOG.md?plain=1#L83
2023-08-30a few fixes for ipfs moduleJack Maloney
2023-07-27fix: correct description of services.ofborg.logFileEmily Trau
2023-07-25sketchybar: initZhong Jianxin
Fix #581
2023-07-24eternal-terminal: enable keep aliveryane
See https://github.com/LnL7/nix-darwin/pull/745#discussion_r1272806159
2023-07-24eternal-terminal: change launchd agent configryane
- don't daemonize program - disable keep alive these settings are consistent with the configuration in the project repository: https://github.com/MisterTea/EternalTerminal/blob/1d9cd2be9dc1ec7694e9472004b7910bbb5c34cf/init/launchd/homebrew.mxcl.et.plist
2023-07-23eternal-terminal: add moduleryane
Adds an eternal-terminal module. Much of the implementation is borrowed from the corresponding nixos module: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/eternal-terminal.nix
2023-07-21treewide: fix `mkEnableOption` docsEmily
`mkEnableOption` wraps its argument in a complete sentence with a terminating full stop; an additional newline will add an incorrect space before the end of the sentence in the rendered documentation, and any additional verbiage that doesn't fit into the form "Whether to enable [...]." is also incorrect. In the latter case, the description can be overridden manually.
2023-07-16Merge pull request #731 from emilazy/etc-checksEmily
etc: check for existing files during checks stage
2023-07-16etc: check for existing files during checks stageEmily
This ensures that activation fails early if there are any `/etc` files with unexpected state, rather than leaving the system half-activated.
2023-07-13use `types.lines` for yabai.extraConfig optionYusef Napora
This allows setting the option definition in multiple locations. The final value will be all definitions concatenated with `\n`.
2023-07-12Update modules/services/cachix-agent.nixDomen Kožar
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
2023-07-12cachix-agent: clarify what should be in the token fileDomen Kožar
2023-07-12etc: use `.before-nix-darwin` instead of `.orig`Michael Hoang
2023-07-10Fix spellingAndrew Marshall
2023-07-10trezord: Add launchd user agent service module for configuring trezordmitchmindtree
This adds a small module for configuring the trezor-bridge service, trezord. This service enables users to interact with their Trezor hardware wallet through the trezor suite web interface, or to use the device for U2F auth, SSH login, GPG or password mgmt. https://trezor.io/learn/a/what-is-trezor-bridge The options were copied directly from the nixos service module here: https://github.com/NixOS/nixpkgs/blob/9d6e454b857fb472fa35fc8b098fa5ac307a0d7d/nixos/modules/services/hardware/trezord.nix#L16 The implementation was adapted from the nixos module's systemd service to a launchd user agent. Tested successfully locally on an Air M2.
2023-06-27tailscale: improve MagicDNS setupMichael Hoang
2023-06-25Merge pull request #675 from serokell/rvem/update-buildkite-moduleDaiderd Jordan
buildkite-agent: fix launchd daemon environment
2023-06-24treewide: convert all option docs to MarkdownEmily
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-24treewide: manually convert some docs to MarkdownEmily
These all use DocBook markup too complex for `nix-doc-munge` to handle, have syntax that clashes with Markdown, or already contain Markdown syntax that currently isn't rendering correctly. Converting DocBook list syntax makes me think that maybe Markdown isn't so bad after all.
2023-06-24{offlineimap,tailscale}: fix `enable` option docsEmily
The argument to `mkEnableOption` is automatically wrapped in a full sentence.
2023-06-24treewide: tweak DocBook docs for conversionEmily
These help `nix-munge-doc` automate more of the Markdown conversion process. See the following nixpkgs commits for explanations of many of these changes: * https://github.com/NixOS/nixpkgs/commit/275a34e0d8a937a81b267e47302dd8a92fa781df * https://github.com/NixOS/nixpkgs/commit/694d5b19d30bf66687b42fb77f43ea7cd1002a62 * https://github.com/NixOS/nixpkgs/commit/f1d39b6d6187997b630647400c5efe5b01e06a23 * https://github.com/NixOS/nixpkgs/commit/16102dce2fbad670bd47dd75c860a8daa5fe47ad I couldn't think of any particularly good way to format the `system.defaults` breadcrumbs, so I just made them standalone paragraphs. They weren't rendering correctly in DocBook anyway.
2023-06-24wq-quick: document `publicKey` optionEmily
All exposed options should have documentation, and `nixosOptionDoc` will give an error if it's missing.
2023-06-21buildkite-agent: fix launcd daemon environmentRoman Melnikov
Add missing 'NIX_SSL_CERT_FILE'
2023-06-18add ipfs serviceJack Maloney
2023-05-16buildkite-agent: allow 'types.path' in runtimePackagesRoman Melnikov
This might be useful when some non-nix packages need to be provided, e.g. 'brew'.
2023-05-10buildkite-agent: update moduleRoman Melnikov
Update module to look it similar to what it currently present in 'nixpkgs'. Mainly, to provide support for running multiple buildkite-agents.