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

198 commits

Author SHA1 Message Date
Vincent Haupert
06f5dab065 github-runners: adapt to NixOS module
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-28 09:40:25 +01:00
Domen Kožar
0e6857fa1d
Merge pull request #859 from yaxitech/github-runner
github-runners: init module
2024-02-18 04:48:38 +00:00
Nikodem Rabuliński
4363d3b42f
services/yabai: Remove IFD
enableScriptingAddition no longer triggers IFD
by using runCommand to generate sudoers.d/yabai,
instead of builtins.hashFile and interpolating the string in nix.
2024-02-01 23:06:13 +01:00
Michael Hoang
91b9daf672
Merge pull request #780 from kalbasit/update_yabai_sa_script
services/yabai: Remove --check-sa and --install-sa flags
2024-01-30 12:32:45 +10:00
Vincent Haupert
21b92addaf github-runners: init module
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
2024-01-22 10:27:11 +01:00
Richard Huang
892482250c
[yabai] Configure scripting addition
Allow admins to execute `yabai --load-sa` as the root user without
having to enter a password
2023-11-18 21:01:01 -08:00
Yacine Hmito
4fa7b5cdd1 Add security.pki.installCACerts config
Made is possible to disable the management of
/etc/ssl/certs/ca-certificates.crt by Nix darwin.
2023-11-11 12:36:28 +01:00
Wael M. Nasreddine
30311b6f90
services/yabai: Remove --check-sa and --install-sa flags
The --check-sa and --install-sa flags were removed in favor of
--load-sa as of version 5.0.0 of Yabai.

ee0137f37d/CHANGELOG.md (L83)
2023-09-14 09:01:04 -07:00
Emily Trau
588303a21f fix: correct description of services.ofborg.logFile 2023-07-27 14:05:53 +10:00
Zhong Jianxin
56f56c80ef sketchybar: init
Fix #581
2023-07-25 18:58:56 +08:00
ryane
9f8bc612c8
eternal-terminal: enable keep alive
See https://github.com/LnL7/nix-darwin/pull/745#discussion_r1272806159
2023-07-24 20:44:49 -04:00
ryane
c4a1a1c458
eternal-terminal: change launchd agent config
- don't daemonize program
- disable keep alive

these settings are consistent with the configuration in the project
repository:
1d9cd2be9d/init/launchd/homebrew.mxcl.et.plist
2023-07-24 17:50:26 -04:00
ryane
6adc4c680b
eternal-terminal: add module
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-23 08:20:28 -04:00
Emily
5fd8914dac treewide: fix mkEnableOption docs
`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-21 21:17:59 +01:00
Emily
61662a63bf
Merge pull request #731 from emilazy/etc-checks
etc: check for existing files during checks stage
2023-07-16 15:16:07 +01:00
Emily
4eb1c549a9 etc: check for existing files during checks stage
This ensures that activation fails early if there are any `/etc` files
with unexpected state, rather than leaving the system half-activated.
2023-07-16 12:15:07 +01:00
Yusef Napora
fbc47b7bbc use types.lines for yabai.extraConfig option
This allows setting the option definition in multiple locations.
The final value will be all definitions concatenated with `\n`.
2023-07-13 14:53:24 -04:00
Domen Kožar
c80294ef26
Update modules/services/cachix-agent.nix
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
2023-07-12 16:46:02 +01:00
Domen Kožar
adc6a88ff1
cachix-agent: clarify what should be in the token file 2023-07-12 15:11:49 +01:00
Michael Hoang
63af129cb5 etc: use .before-nix-darwin instead of .orig 2023-07-12 08:35:36 +10:00
Andrew Marshall
4a7da05c1e Fix spelling 2023-07-10 08:30:15 -04:00
Michael Hoang
d2b70c61bf tailscale: improve MagicDNS setup 2023-06-27 01:38:51 +10:00
Daiderd Jordan
53c6748f98
Merge pull request #675 from serokell/rvem/update-buildkite-module
buildkite-agent: fix launchd daemon environment
2023-06-25 10:52:13 +02: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
Emily
efe314cdba treewide: manually convert some docs to Markdown
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 10:48:55 +01:00
Emily
c2716817a8 {offlineimap,tailscale}: fix enable option docs
The argument to `mkEnableOption` is automatically wrapped in a full
sentence.
2023-06-24 10:48:55 +01:00
Emily
b97c235e37 treewide: tweak DocBook docs for conversion
These help `nix-munge-doc` automate more of the Markdown conversion
process. See the following nixpkgs commits for explanations of many
of these changes:

* 275a34e0d8
* 694d5b19d3
* f1d39b6d61
* 16102dce2f

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-24 10:48:55 +01:00
Emily
96cb49133b wq-quick: document publicKey option
All exposed options should have documentation, and `nixosOptionDoc`
will give an error if it's missing.
2023-06-24 10:48:55 +01:00
Roman Melnikov
f253b41de8
buildkite-agent: fix launcd daemon environment
Add missing 'NIX_SSL_CERT_FILE'
2023-06-21 09:35:41 +02:00
Jack Maloney
1711db734e
add ipfs service 2023-06-18 00:44:04 -05:00
Roman Melnikov
6236fd1923
buildkite-agent: allow 'types.path' in runtimePackages
This might be useful when some non-nix packages need to be provided,
e.g. 'brew'.
2023-05-16 15:58:30 +08:00
Roman Melnikov
da2c0a74ca
buildkite-agent: update module
Update module to look it similar to what it currently present in
'nixpkgs'. Mainly, to provide support for running multiple
buildkite-agents.
2023-05-10 16:26:20 +08:00
Michael Hoang
90b36a5efe synergy: add options for TLS 2023-04-18 14:31:42 +09:00
Domen Kožar
025912529d
Merge pull request #625 from Enzime/improve-karabiner-elements
Improve Karabiner-Elements installer reliability
2023-04-10 20:19:54 +01:00
Michael Hoang
e5c994a6af Improve Karabiner-Elements installer reliability
Hopefully fixes #564
2023-03-29 22:27:28 +09:00
Vadim
8699abe98f
fix(wg-quick): builtins function typo 2023-03-21 13:23:16 +03:00
Robert Hensing
7ec26a9042 services.hercules-ci-agent: Explain default concurrentTasks is core count 2022-12-29 19:01:54 +01:00
Robert Hensing
5311f8ded0 hercules-ci-agent: Remove old nix version check
This problem is multiple releases in the past now. It has served
its purpose.
2022-12-22 20:18:53 +01:00
Robert Hensing
3cb5cfa5f9 hercules-ci-agent: init
Source files originate from the hercules-ci-agent repository and
I will make sure to keep them in sync, bidirectionally.

The module is split into two files to make maintenance of the
common parts with NixOS easier.
2022-12-22 20:18:53 +01:00
Domen Kožar
2795e05cca
Merge pull request #468 from lf-/postgres-update
services/postgresql: update to the latest upstream nixos module
2022-12-14 12:28:02 +00:00
4825764518
c148d28c67
Add wg-quick module 2022-12-02 20:55:53 -05:00
Jade Lovelace
c9fcec4b6b services/postgresql: update to the latest upstream nixos module
I want a newish postgres config to work on my Mac.

This contains a little hack (putting the check-config derivation into
the start script as a comment) to deal with not having #356.

It's otherwise identical to the upstream module.
2022-11-10 13:13:10 -08:00
Michael Hoang
bdd5d81b13 tailscale: prevent significant DNS footgun 2022-09-20 18:03:50 +10:00
Michael Hoang
0ae311e1c7 tailscale: fix tailscaled not running as root
Run `tailscaled` using a system daemon as it does not work as a non-root
user without `userspace-networking`.

Also, remove the broken warning relating to setting the search domain.
Manually adding the search domain to `networking.search` isn't necessary
to use only machine names to refer to other machines.
2022-09-20 18:03:17 +10:00
Domen Kožar
14a12e9ee7
Merge pull request #499 from Enzime/karabiner-elements
Karabiner-Elements
2022-09-19 13:32:50 +01:00
Domen Kožar
c703f79e3e
Merge pull request #528 from sikmir/yabai
yabai: set default package
2022-09-18 10:08:35 +01:00
Nikolay Korotkiy
4eed79d4ac
yabai: set default package 2022-09-16 17:46:17 +03:00
Greg Pfeil
7698ffce98 Remove lib.mdDoc usage 2022-09-09 11:40:42 -06:00
Greg Pfeil
cfd60e8c54 Add tailscale service module 2022-09-09 11:26:49 -06:00
Michael Hoang
ed4d2d69a0 karabiner-elements: don't use scripts
`launchd.daemons.*.script` are stored in `/nix/store` which might not be
mounted when the launch daemon attempts to start.
2022-09-01 14:39:26 +10:00