1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-15 17:51:01 +00:00
Commit graph

1255 commits

Author SHA1 Message Date
Trevor Opiyo
2839ef54aa Add support for zsh-fast-syntax-highlighting 2024-05-29 12:24:11 -05:00
Michael Hoang
c0d5b8c54d
Merge pull request #958 from kamushadenes/master
Add support for trackpad force click
2024-05-30 00:41:28 +10:00
Henrique Goncalves
9639c5509b
Update modules/system/defaults/NSGlobalDomain.nix
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
2024-05-25 03:14:18 -03:00
Henrique Goncalves
2e0f9a9e50
Update NSGlobalDomain.nix 2024-05-23 16:56:43 -03:00
Henrique Goncalves
0e5fc0028b
Update NSGlobalDomain.nix 2024-05-23 16:50:15 -03:00
Henrique Goncalves
120e085d1a
Update NSGlobalDomain.nix 2024-05-23 16:42:31 -03:00
Henrique Goncalves
6cbe6bc2da
Update trackpad.nix 2024-05-23 16:40:17 -03:00
Andrew Marshall
7f897008d4 environment: Adjust systemPath order to allow injecting in the middle
Previously, it was not possible to inject PATH entries between profiles
and the “default system” PATH entries. This confounds adding, e.g.
Homebrew on aarch64’s non-standard prefix as higher priority than the
builtin system paths, but lower than Nix profiles.

This is a backwards-incompatible change for some users, but should only
be so in the case a user used `mkOrder` with a value between 1000 (the
default priority) and 1200. Value of 1200 chosen as the same delta from
the default as just below in `environment.profiles` (which uses 800),
and mkAfter is 1500 so will still go after this.
2024-05-23 09:55:35 -04:00
Michael Hoang
eac4f25028
Merge pull request #955 from qowoz/hercules-security
hercules-ci-agent: fix crash calling `security`
2024-05-22 08:15:35 +10:00
zowoq
251eaabfa0 hercules-ci-agent: fix crash calling security
this applies the same fix that was used for the cachix agent in e043606b50
2024-05-21 23:16:46 +10:00
techknowlogick
de20ea4882
remove final lib.mddoc 2024-05-16 12:48:56 -04:00
Sander
e043606b50
cachix-agent: fix crash calling security
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-05-16 18:04:33 +04:00
Ricardo Pinto
93913d14a3
Add file or directory tile to Dock persistent others 2024-05-15 07:49:00 +01:00
Dominik Gleich
c8a8faedbc
Change zsh default prompt 2024-05-20 09:48:03 +02:00
Ricardo Pinto
457a5d9952
Add persistent others to dock 2024-05-13 13:46:54 +01:00
zowoq
ec06ea8837 nix-daemon: increase SoftResourceLimits.NumberOfFiles
1048576 matches the nixos/nix plist

e3a4e40a35/misc/launchd/org.nixos.nix-daemon.plist.in (L29)
2024-04-24 16:03:49 +10:00
Michael Hoang
9e7c20ffd0
Merge pull request #932 from wegank/mddoc-remove
treewide: remove lib.mdDoc
2024-04-20 02:24:36 +10:00
Weijia Wang
def1e23be8 treewide: remove lib.mdDoc 2024-04-19 04:05:50 +02:00
Jefferson Bledsoe
81f7aab5ed
Update ShowDate in menuExtraClock 2024-04-18 13:53:30 +00:00
Michael Hoang
36524adc31
Merge pull request #915 from malob/add-nix-optimise-module
Add `nix.optimise` module
2024-03-30 12:48:46 +11:00
Malo Bourgon
398510f601 Add nix.optimise module 2024-03-27 12:50:04 -07:00
Hyunggyu Jang
83a9a41f1b Use valid maintainer 2024-03-26 13:58:02 +09:00
Michael Hoang
c7ae5dc969
Merge pull request #725 from mitchmindtree/trezord 2024-03-13 02:00:15 +11:00
Dylan Frankland
5c65cfb656 Add support for persistent-apps in dock 2024-03-03 21:32:17 -08:00
Michael Hoang
e7d7a7f0c5
Merge pull request #821 from qowoz/users
users: fix `forceRecreate` bash comparison
2024-03-04 16:25:51 +11:00
Michael Hoang
1032f0963f
Merge pull request #767 from jmmaloney4/master
a few fixes for ipfs module
2024-03-04 16:23:30 +11:00
Michael Hoang
530f265072
Merge pull request #897 from dfrankland/fix-writing-values-with-containers
fix writing values with containers
2024-03-04 16:16:05 +11:00
Dylan Frankland
b620e32a76 fix writing values with containers
Complex container values like `-array` have their own DSL which does not
allow specifying all data types. Instead of using the DSL use plist
fragments instead.
2024-03-02 22:29:56 -08:00
Mark Sisson
3397ab3b77
feat(nix): adapt nix.conf validation for different Nix versions
This commit updates the nix.conf validation logic to accommodate
different versions of Nix. It introduces a conditional assignment
of the `showCommand` variable, which determines the appropriate
command to use based on the Nix version. For versions at least
"2.20pre", it uses "config show"; otherwise, it falls back to
"show-config". This change ensures compatibility across various
Nix releases.
2024-03-02 18:51:25 -06:00
Michael Hoang
8a15cb36ff
Merge pull request #892 from Samasaur1/startup-chime
`system.startup.chime`: init
2024-03-02 13:57:42 +11:00
Domen Kožar
70d162d468
Merge pull request #891 from mattpolzin/nix-direnv
nix-darwin/programs.direnv: init
2024-03-01 18:23:36 +07:00
Sam
ee53e5785c
system.startup.chime: init 2024-02-29 22:23:40 -08:00
Sam
0363c18c37
system.nvram: init (internal) 2024-02-29 22:20:04 -08:00
Moritz Rumpf
ad98aebc0f Fix doc render problem
This fixes:
```
RuntimeError: can't render html in the presence of docbook
```
2024-02-29 08:45:54 +01:00
Moritz Rumpf
2ffb75f942 defaults: Add options for dragOnGesture feature
This is just a rebased version of https://github.com/LnL7/nix-darwin/pull/513

Credit to @2gn
2024-02-29 08:45:54 +01:00
Domen Kožar
283d59778e
Merge pull request #893 from yaxitech/github-runner-2
github-runners: adapt to NixOS module
2024-02-28 16:35:25 +07:00
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
Mathew Polzin
9090c6f897 nix-darwin/programs.direnv: init 2024-02-27 08:38:36 -06:00
Sam
44888312de
security.sudo.extraConfig: fix default behavior 2024-02-26 18:21:48 -08:00
Evan Petousis
f1a0d68a8f
etc: add known hash for /etc/zshenv and /etc/nix/nix.conf
Adds support for DeterminateSystems installer 0.16.0 and later. Fixes #880.
2024-02-23 18:45:24 +11:00
Logan Barnett
27e6a022f2
apply feedback, fix merge goof 2024-02-21 10:44:30 -08:00
Logan Barnett
9f4fbed460
Merge remote-tracking branch 'ethnt/linux-builder-systems-config' into linux-builder-big-config-take-2 2024-02-21 09:29:40 -08:00
Logan Barnett
208cd70d04
Merge remote-tracking branch 'stv0g/linux-runner-options' into linux-builder-big-config-take-2 2024-02-21 09:27:02 -08:00
Logan Barnett
61c5879b5a
linux-builder: default pass through protocol to nix.buildMachines
This commit adds a protocol option for the `linux-builder` and defaults
it to `ssh-ng`.  I have observed it needing this with the following:

``` sh
$ nix store ping --store ssh://linux-builder
Store URL: ssh://linux-builder

$ nix store ping --store ssh-ng://linux-builder
Store URL: ssh-ng://linux-builder
Version: 2.18.1
Trusted: 0
```

This seems to make the difference on whether or not Nix picks up
`linux-builder` as an available builder.
2024-02-20 13:10:24 -08:00
Steffen Vogel
94558e7e8b linux-builder: Pass through more options to nix.buildMachines
This commit passes more options to  nix.buildMachines. Namely the mandatoryFeatures and speedFactor settings have been missing.
2024-02-18 13:25:01 +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
Sam
37eb625dd4
security.sudo.extraConfig: init 2024-02-11 14:16:23 -08: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
Michael Hoang
00538eecf2
Merge pull request #861 from thanegill/darwin-rebuild-completions
Add zsh completions to darwin-rebuld by default
2024-01-29 13:03:01 +10:00
Thane Gill
0f0478efa6 Add zsh completions to darwin-rebuld by default 2024-01-27 19:37:27 -08:00
Thane Gill
3a9755f98d Use nixpkgs generators.toPlist for launchd service generation.
Fixes #93
2024-01-27 17:09:41 -08:00
Michael Hoang
1e706ef323
Merge pull request #857 from thanegill/patch-2
Allow launchd serivceConfig.LimitLoadToSessionType to be a list
2024-01-22 19:29:28 +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
Jōshin
a3be68d105
Add option to disable zsh global compinit
Fixes #855.
2024-01-21 03:24:00 -05:00
Michael Hoang
3ac7acd32d
Merge pull request #854 from kallisti-dev/fix/network-names-shell-escapes
fix shell escaping in networking config
2024-01-21 10:14:09 +10:00
Hraban Luyat
f1d47fc2dd fix: set shell for new users, and only known ones 2024-01-20 11:03:15 -05:00
Hraban Luyat
888533c35f fix: user shell path handling
Properly detect the binary name (not just /nix/store/...-bash, but include the
.../bin/bash), and use the symlinked name which also appears in /etc/shells.
2024-01-20 11:03:15 -05:00
Thane Gill
6b27542e86 Allow launchd serivceConfig.LimitLoadToSessionType to be a list
Per: https://developer.apple.com/library/archive/technotes/tn2083/_index.html#:~:text=If%20you%20want%20to%20run%20in%20more%20than%20one%20session%20type%2C%20you%20can%20set%20LimitLoadToSessionType%20to%20an%20array%2C%20where%20each%20element%20is%20a%20session%20type%20string.

LimitLoadToSessionType can also be an array if more than one session type is desired.
2024-01-19 15:45:52 -08:00
Adam Curtis
5cec74dae1 fix shell escaping in networking config 2024-01-19 12:16:32 -05:00
XMLHexagram
4051e3027d
Add type definition on fonts.fontDir.enable 2024-01-16 21:07:41 +08:00
Jacek Galowicz
c4ea346d0f Dedupe the WorkingDirectory path of the linux-builder 2024-01-15 13:51:34 +01:00
Michael Hoang
0dd382b70c
Merge pull request #820 from mhumeSF/reduce-motion
Add `universalaccess.reduceMotion` option
2024-01-03 10:28:40 +00:00
Michael Hoang
dbbcad8b9b linux-builder: remove trusted user requirement
If you set up a signing key for the `linux-builder` and add that as
trusted public key on your machine, you won't need to be a trusted user
at all.
2023-12-31 14:00:39 +11:00
Carl Thomé
59bef44059
Fix type error
```
error: A definition for option `launchd.user.agents.[...].serviceConfig.StartCalendarInterval' is not of type `null or (list of (submodule))'. Definition values:
       - In `<unknown-file>':
           {
             Hour = 0;
             Minute = 0;
           }
```
2023-12-30 23:47:20 +01:00
Austin Horstman
f6cf46f7bc
GlobalPreferences: fix mouse scaling example 2023-12-29 14:09:38 -06:00
fortuneteller2k
9acb5b1adc Use native floats for mouse scaling 2023-12-27 11:30:04 +08:00
Michael Hoang
850eabce44 etc: add known hash for /etc/shells 2023-12-23 22:41:58 +11:00
zowoq
0b638a97c0 users: fix forceRecreate bash comparison 2023-12-04 10:31:36 +10:00
Mike Hume
6c40798934 Adding reduce motion option 2023-12-01 15:10:10 -05:00
Michael Hoang
4b9b83d5a9
Merge pull request #806 from DeterminateSystems/easier-uninstall
Install darwin-uninstall by default, which includes the 'empty' config it switches to
2023-11-24 14:11:34 +11:00
Domen Kožar
c465a67a54
Merge pull request #809 from Enzime/more-hashes
etc: add more known hashes
2023-11-23 10:46:16 +01:00
Ethan Turkeltaub
72dd60bfc9
Add default system to systems option 2023-11-22 20:43:29 -05:00
Ethan Turkeltaub
6a3a683d43
Use nix.buildMachines.*.systems instead of nix.buildMachines.*.system 2023-11-22 20:43:28 -05:00
Ethan Turkeltaub
a5812ff83c
Add nix.linux-builder.systems option to set corresponding nix.buildMachines.*.systems option 2023-11-22 20:43:27 -05:00
Francesc Esplugas
b2dff2033d fix: initdb missing data area directory
Use `PGDATA` environment variable instead of `-D` to maintain
consistency with NixOS module.

Co-Authored-By: Michael Hoang <enzime@users.noreply.github.com>
2023-11-23 11:00:33 +11: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
Graham Christensen
09284ab00b Install darwin-uninstall by default, which includes the 'empty' config it switches to
Co-Authored-By: Michael Hoang <enzime@users.noreply.github.com>
2023-11-16 17:47:24 +11:00
Michael Hoang
d4efdb7f88 etc: add more known hashes
This should be less of an issue as of DetSys' nix-installer 0.15.0 which
no longer includes the version number in `nix.conf`.
2023-11-16 14:26:25 +11:00
Michael Hoang
e67f2bf515
Merge pull request #803 from felixscheinost/fix-unbound-variable-etcProblems
Fix unbound variable `etcProblems`
2023-11-13 20:32:58 +11: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
Felix Scheinost
39a412d47d Fix unbound variable etcProblems
I have another activationScript which traps errors. Currently `etcProblems` can be unbound.
2023-11-09 12:44:10 +01:00
Domen Kožar
eb2b9b6423
Merge pull request #785 from Enzime/deferred-modules
linux-builder: change from `modules` to `config`
2023-11-08 09:58:53 +00:00
Michael Hoang
afe83cbc2e
Merge pull request #791 from lilyball/linux-builder-tmpdir
linux-builder: avoid /tmp for certs
2023-10-27 19:55:34 +02:00
Alexis Destrez
e621b5aea7 Provide 'supportedFeatures' option to the linux builder module 2023-10-18 17:47:27 +02:00
Lily Ballard
160eb3d99d linux-builder: avoid /tmp for certs
Fixes #768
2023-10-09 16:09:11 -07:00
Michael Hoang
70af808347 linux-builder: change from modules to config
Using the type `deferredModule` fixes `pkgs` not being accessible as a
module argument (apart from `config._module.args.pkgs`).
2023-09-29 12:38:39 +01:00
Michael Hoang
e236a1e598
Merge pull request #187 from kalbasit/known-hosts-only-if-set
programs.ssh: write ssh known_hosts only if there are any set
2023-09-26 01:05:13 +01:00
Domen Kožar
8caf3af927
Create $out/darwin-version
This fixes backwards compatibility with code that expects it.
2023-09-19 09:54:27 +01:00
Chris Montgomery
c8f0bc5c29
time: bury useless systemsetup -settimezone output
Fixes #359
2023-09-15 15:59:14 -04:00
Wael M. Nasreddine
e58bcb921b
programs.ssh: write ssh known_hosts only if there are any set 2023-09-15 08:24:20 -07: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
Michael Hoang
4496ab2662
Merge pull request #771 from Benjamin-L/support-dfont-fonts
Add support for dfont to the fonts module
2023-09-12 07:50:42 +02:00
Malo Bourgon
0625792671 Add homebrew.onActivation.extraFlags option 2023-09-11 11:22:23 -07:00
Benjamin Lee
ba92c4d307
add support for dfont to the fonts module 2023-09-08 15:43:25 -07:00
Jack Maloney
8e102a9991
a few fixes for ipfs module 2023-08-30 09:15:29 -05:00
run
ffccbdf7d8
add progress to homebrew package installations 2023-08-17 10:00:39 +05:30
zowoq
b671517f28 finder: types.string -> types.str
`string` was changed from deprecation warning to error in c59c6b1c57
2023-08-10 13:46:47 +10:00
Emily
e2187d633c fish: simplify babelfishTranslate 2023-08-05 22:57:44 +01:00
Emily
e65825ca9e fish: add default for babelfishPackage
This option should probably be dropped but I'd prefer to batch that
with using Babelfish by default (or unconditionally, as Home Manager
does) so as to avoid multiple independent breaking changes.

Fixes: #632
2023-08-05 21:36:54 +01:00
Lily Ballard
97e978626e linux-builder: add maxJobs option
Fixes #751
2023-08-02 12:33:34 -07:00
Emily Trau
588303a21f fix: correct description of services.ofborg.logFile 2023-07-27 14:05:53 +10:00
Jakub Janczak
6a00d1b59b Update modules/programs/bash/default.nix
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
2023-07-26 09:19:33 +02:00
Jakub Janczak
e21b70da3f Don't run static bashrc only for pure nix-shell 2023-07-26 09:19:33 +02:00
Michael Hoang
1c1dd8b070
Merge pull request #595 from azuwis/sketchybar
sketchybar: init
2023-07-26 09:50:15 +10:00
Michael Hoang
a96987cef4
Merge pull request #713 from pik694/master
Dock icon magnification settings
2023-07-26 09:44:43 +10:00
Piotr Żelazko
7ff10017ed
chore: apply CR suggestions 2023-07-25 18:40:30 +02: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
Emily
a5b09580e2
Revert "eval-config: set class" 2023-07-24 23:24:20 +01:00
Emily
8f0e02cfc8
Merge pull request #744 from emilazy/set-module-class
eval-config: set `class`
2023-07-24 23:10:33 +01: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
Piotr Żelazko
640331dfba docs: add magnification values range 2023-07-24 21:16:04 +02: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
Michael Hoang
0f9058e739
Merge pull request #733 from Enzime/version
Add `darwin-version` command
2023-07-23 18:16:13 +10:00
Emily
ced9f58f87
Merge pull request #743 from emilazy/fix-enable-option-docs
treewide: fix `mkEnableOption` docs
2023-07-23 04:50:08 +01: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
0d3ad9e7ff documentation: use eval-config.nix
Avoid letting the module evaluation for the documentation drift out
of sync with how system configurations are evaluated.
2023-07-21 09:22:21 +01:00
Quentin Smith
f1a206c960
Merge remote-tracking branch 'origin/master' into fonts 2023-07-19 17:04:42 -04: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
Emily
c91c351943 etc: rename activation script variables 2023-07-16 12:13:27 +01:00
Michael Hoang
0dafe2170d Add darwin-version command 2023-07-14 23:06:46 +10: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
Emily
2ad716c278
Merge pull request #732 from Enzime/use-nix-darwin
flake: use `nix-darwin` instead of `darwin`
2023-07-12 19:57:23 +01: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
4511c29a72 flake: use nix-darwin instead of darwin 2023-07-12 10:36:14 +10:00
Michael Hoang
63af129cb5 etc: use .before-nix-darwin instead of .orig 2023-07-12 08:35:36 +10:00
Michael Hoang
cad8954f75 etc: fail if we can't add a file
Fixes #598
2023-07-11 18:59:05 +10:00
Michael Hoang
4b90ea84e4 doc: store a copy of known files 2023-07-11 18:59:05 +10:00
Michael Hoang
22620845fe readme: update with new flaky instructions 2023-07-11 18:59:05 +10:00
Michael Hoang
5288a72354 Allow flaky installation with darwin-rebuild 2023-07-11 18:59:05 +10:00
Michael Hoang
f70f90c422 flake: add packages.darwin-{option,rebuild} 2023-07-11 18:59:05 +10:00
Marco Rebhan
b70656affa Add system.systemBuilderCommands and systemBuilderArgs
These are the equivalents of the
NixOS options with the same name, introduced in
d3ac0938a7.
Allows running extra commands while building the system configuration
output, for example to add extra files into the output directory,
and passing arguments to the system builder's mkDerivation.
2023-07-10 16:05:55 +02:00
Andrew Marshall
591446ca94 nix: Remove readOnlyStore option as it has no effect
This being under `nix` in upstream is misleading as it is only used in
the NixOS boot stage, not as configuration for the Nix daemon.
2023-07-10 08:30:38 -04:00
Andrew Marshall
4a7da05c1e Fix spelling 2023-07-10 08:30:15 -04:00
mitchmindtree
66f85cb9db trezord: Add launchd user agent service module for configuring trezord
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:
9d6e454b85/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-07-10 19:21:10 +10:00
Cuichen Li
8364529fc4 fix zsh eating output without new line ending 2023-07-10 15:00:02 +08:00
Daiderd Jordan
66a3047fa8
Merge pull request #723 from emilazy/rationalize-nixpkgs-handling
Rationalize handling of Nixpkgs
2023-07-09 12:34:19 +02:00
Emily
f9724c4543 eval-config: rationalize handling of Nixpkgs
This is a big change that disentangles a lot of mistaken assumptions
about mixing multiple versions of Nixpkgs, treating external flake
inputs as gospel for the source of Nixpkgs and nix-darwin, etc.;
the end result should be much simpler conceptually, but it will be a
breaking change for anyone using `eval-config.nix` directly. Hopefully
that shouldn't be a big issue, as it is more of an internal API and
it's quite likely that existing uses may have been broken in the same
way the internal ones were.

It was previously easy to get into a state where your `lib` comes
from nix-darwin's `nixpkgs` input or a global channel and your
`pkgs` comes from another major version of Nixpkgs. This is pretty
fundamentally broken due to the coupling of `pkgs` to its corresponding
`lib`, but the brokenness was hidden much of the time until something
surfaced it. Now there is exactly one mandatory `lib` input to system
evaluation, and the handling of various additional options like `pkgs`
and `system` can be done modularly; maintaining backwards compatibility
with the previous calling convention is punted to the `default.nix`
and `lib.darwinSystem` entry points. `inputs` is no longer read by
nix-darwin or special in any way, merely a convention for user code,
and the argument is retained in the entry points only for backwards
compatibility.

All correct invocations of the entry points should keep working
after this change, and some previously-broken ones should be fixed
too. The documentation and template have been adjusted to show the
newly-recommended modular way of specifying various things, but no
deprecation warnings have been introduced yet by this change.

There is one potential, mostly cosmetic regression:
`system.nixpkgsRevision` and related options are less likely to be
set than before, in cases where it is not possible to determine the
origin of the package set. Setting `nixpkgs.source` explicitly will
make this work again, and I hope to look into sending changes upstream
to Nixpkgs to make `lib.trivial.revisionWithDefault` behave properly
under flakes, which would fix this regression and potentially allow
reducing some of the complexity.

Fixes: #669
2023-07-09 11:21:40 +01:00
Emily
51ba5e614a version: rewrite Git revision logic
We trust the version information from `nixpkgs.source` when `pkgs` was
constructed by the `nixpkgs` module or `nixpkgs.source` was explicitly
set by the configuration. Otherwise, we rely on Nixpkgs to report its
own version, which handles the same cases as the old logic and opens
the door to Nixpkgs automatically reporting the correct revision when
using flakes.
2023-07-09 07:26:23 +01:00
Emily
72b7e8668c version: default Git revision options to null
This allows for more uniform handling in the documentation generator,
and avoids lying about the Git reference being `master` internally.
2023-07-09 07:26:00 +01:00
Michael Hoang
d9e825f121 linux-builder: fix evaluation errors
- `modules` cannot be a nested list
- `nix.settings.extra-trusted-users` might not be set
2023-07-09 13:55:22 +10:00
Emily
e25eeff158 nixpkgs: rebase module on latest NixOS
This is based on the current NixOS `nixpkgs` module, adjusted for the
nix-darwin context and without adding the options due for deprecation
in NixOS.

This gives us the ability to set the package set modularly through
`nixpkgs.pkgs` and builds up infrastructure for handling user-specified
Nixpkgs instantiations more robustly.

The cross-compilation options are currently not very useful due to
even Darwin->Darwin cross-compilation not being wholly functional
yet, but it looks feasible to build an `aarch64-darwin` system from
`x86_64-darwin` with some patching and it should be possible to make
cross-compilation more widely supported after the Darwin SDK situation
in Nixpkgs improves.

One casualty is the error for setting `nixpkgs.*` options when
overriding the package set. That could be ported over to this new
scheme, but it'd increase divergence with the NixOS module and reduce
cross-compatibility of configurations, so I lean towards adding it
upstream to NixOS if anything. (But if people want to keep it I can add
it back.)
2023-07-08 22:39:19 +01:00
Emily
2d20e86111 documentation: use feature test for docs generator
This should be less brittle than the version-based check, although
arguably this kind of `lib.version` mismatch should break as early
as possible...

Fixes: #718
2023-07-08 21:04:34 +01:00
Michael Hoang
d2b01ab455 nix/linux-builder: init 2023-07-08 14:05:37 +10:00
Domen Kožar
b06bab83bd
Merge pull request #711 from Enzime/fix/magicdns
tailscale: improve MagicDNS setup
2023-07-02 15:17:20 +01:00
Robert Hensing
89ec258c7c documentation: Link to nixpkgs master if rev is unknown
This fixes

    error: The option `system.nixpkgsRevision' is used but not defined.
2023-06-30 02:14:35 +02:00
Piotr Żelazko
8c1c48c87a
feat: add dock icon magnification settings 2023-06-27 16:44:16 +02:00
Michael Hoang
d2b70c61bf tailscale: improve MagicDNS setup 2023-06-27 01:38:51 +10:00
Daiderd Jordan
cb37c35e33
fix darwin-option descriptions
Also drops the eval hacks in favour of jq.
2023-06-25 13:03:52 +02: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
69648c6cbb doc/manual: use nixos-render-docs
Now that all the DocBook documentation is gone, we can switch to the
new NixOS documentation generator. No meaningful change in HTML output,
except that I removed the rather pointless preface and changed the
title accordingly. Manual page output is greatly improved; it was
kind of broken before. The `sed` hack is pretty gross but I have
confirmed that nixpkgs will be happy to accept a PR to make things
a little more customizable.

This also drops the `manual` alias (deprecated in nixpkgs in 2018
and imported into nix-darwin), and `manualEpub` (because the NixOS
documentation generator doesn't support it and also nobody wants this
as an ebook).
2023-06-24 10:48:55 +01: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
76ce9faca6 doc/manual: use nixosOptionDoc
The only change to `options.json` are that the `declarations` fields
now contain correct GitHub URLs.

The changes to the HTML manual are all either strict improvements:

* "Declared by:" links point to the correct URLs.
* `lib.mdDoc` documentation is included.

or else trivial:

* Additional whitespace in the HTML source.
* Some interchange of `<pre class="programlisting">` and
  `<code class="literal">`.
* Fancy quotes used in some type descriptions.

`optionsDocBook` is exported temporarily as it is used by
`nix-doc-munge` for the Markdown conversion process.

This drops support for building the manual on 22.11, which lacks a
complete implementation of this processor, and provides stubbed-out
manual packages with an explanation on that version.
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
zowoq
fbb3ab94e6 activity monitor: change settings to null
treewide these seem to be the only settings that aren't unset by default which seems inconsistent
2023-06-23 20:29:46 +10:00
Roman Melnikov
f253b41de8
buildkite-agent: fix launcd daemon environment
Add missing 'NIX_SSL_CERT_FILE'
2023-06-21 09:35:41 +02:00
Daiderd Jordan
ed275afbba
Merge pull request #671 from sxyazi/pr-e0f2168d
Add `mouseDriverCursorSize` option
2023-06-20 21:55:53 +02:00
Daiderd Jordan
050da23813
Merge pull request #672 from sxyazi/pr-af01ed5d
Add `AppleScrollerPagingBehavior` option
2023-06-20 21:55:28 +02:00
Daiderd Jordan
689aa795a1
Merge pull request #673 from sxyazi/pr-4df4da65
feat: add `AppleWindowTabbingMode` option
2023-06-20 21:52:47 +02:00
Daiderd Jordan
681c152eea
Merge pull request #679 from dbaynard/patch-1
Document font overriding behaviour
2023-06-20 21:38:47 +02:00
Daiderd Jordan
1b57241a7b
Merge pull request #686 from CathalMullan/master
nix: Add build machines protocol option.
2023-06-20 21:19:39 +02:00
Domen Kožar
8a5af0da9d
Merge pull request #695 from jmmaloney4/master
add ipfs service
2023-06-18 18:46:33 +01:00
Jack Maloney
1711db734e
add ipfs service 2023-06-18 00:44:04 -05:00
Michael Hoang
f532e43f7e templates.flake: add contents of simple.nix 2023-06-17 22:57:44 +10:00
Michael Hoang
fc955520dd flake: add template with basic flake config 2023-06-17 22:09:38 +10:00
Cathal Mullan
51b8bdfc0e
nix: Add build machines protocol option. 2023-06-10 13:44:37 +01:00
Domen Kožar
40e4b85baa
Merge pull request #681 from cole-h/auto-uid
system/checks: allow disabling the buildUsers check
2023-06-08 08:42:41 +01:00
Domen Kožar
5c671dd10f
Merge pull request #677 from Enzime/fix/ssh-pubkeys
ssh: fix public keys in home directory not working
2023-06-08 08:41:09 +01:00
Michael Hoang
257b5c1994 ssh: fix public keys in home directory not working
Added `services.openssh.authorizedKeysFiles` option from NixOS.
2023-06-08 15:44:07 +10:00
Cole Helbling
9c7a07b8b2
system/checks: allow disabling the buildUsers check
This allows systems with auto-allocate-uids enabled to work (by
disabling this check).
2023-06-06 16:21:14 -07:00
David Baynard
d20ba9bf9c Document font overriding behaviour 2023-06-01 22:21:31 +01:00
John Soo
add08fcab0 flakes: Do not verify channels when using flakes. 2023-05-31 07:28:23 -06:00
sxyazi
cfcfcc535e
feat: use enum instead of str for constraints nicer 2023-05-27 01:42:42 +08:00
sxyazi
df00ca18a3
feat: add AppleWindowTabbingMode option 2023-05-27 01:37:34 +08:00
sxyazi
ce785ccacf
feat: add AppleScrollerPagingBehavior option 2023-05-27 01:02:23 +08:00
sxyazi
7bf15660ca
fix: type 2023-05-27 00:37:51 +08:00
sxyazi
0ad226e8c3
feat: add mouseDriverCursorSize option 2023-05-27 00:13:47 +08:00
Daiderd Jordan
b8c286c82c
Merge pull request #616 from gshpychka/patch-1
feat: support writing arrays to system defaults
2023-05-22 19:02:28 +02:00
Quentin Smith
bc776e4940
Match nixos handling of fonts.fonts by looking for .ttf, .ttc, and .otf files in any directory in the passed packages 2023-05-17 20:31:24 -04:00
Daiderd Jordan
dfbdabbb3e
Merge pull request #661 from serokell/rvem/change-buildkite-agent-runtimePackages-option
buildkite-agent: allow 'types.path' in runtimePackages
2023-05-17 19:16:52 +02: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
Hraban Luyat
f1a562eef1 refactor: rename clock option menuExtraClock 2023-05-15 13:44:02 -04:00
Hraban Luyat
f6b7489ddb feat: defaults write com.apple.menuextra.clock 2023-05-15 13:13:18 -04:00
Domen Kožar
0dbf1c2fb1
Merge pull request #654 from shivaraj-bh/authorized-keys
Manage SSH authorized keys for users
2023-05-15 11:59:31 +01:00
Daiderd Jordan
252541bd05
Merge pull request #638 from aerialls/screensaver
feat(screensaver): add support of askForPassword and askForPasswordDelay
2023-05-10 23:42:22 +02:00
Daiderd Jordan
25e28fedda
Merge pull request #650 from amarshall/fix-registry-extra-attrs
nix: Fix registry extra attrs not being applied
2023-05-10 23:26:18 +02:00
Daiderd Jordan
5061eb4557
Merge pull request #612 from maljub01/patch-1
Fix system.patches
2023-05-10 23:22:40 +02:00
sbh69840
f781cb0ac5 give credits 2023-05-10 21:39:27 +05:30
sbh69840
4094dbccde newline eof for authorized-keys conf 2023-05-10 21:30:35 +05:30
sbh69840
ab2e16159f authkeys path in sshd_config 2023-05-10 21:16:52 +05:30
sbh69840
ccaa942888 don't check knownSha256 for authorized_keys files 2023-05-10 20:03:21 +05:30
sbh69840
ecb5840f6b enable copy 2023-05-10 19:35:23 +05:30
sbh69840
64a15676ac support authorized_keys for users 2023-05-10 19:28:00 +05:30
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
Andrew Marshall
fa97d79567 nix: Fix registry extra attrs not being applied
This was
    mkDefault { } // filterAttrs () x

which is interpreted as
    (mkDefault { }) // (filterAttrs () x)

but the intention is
    mkDefault ({ } // filterAttrs () x)

Resulting in lastModified, rev, etc. not being included. This is
essentially just bringing this clause up-to-date with the one from
NixOS.
2023-05-04 23:53:14 -04:00
Julien Brochet
2303eed571
feat(screensaver): add support of askForPassword and askForPasswordDelay 2023-04-30 14:11:40 +02:00
Domen Kožar
a1ee4d333b
Merge pull request #624 from lovesegfault/repeated-fonts
fix(modules/fonts): ignore repeated fonts
2023-04-20 18:57:12 +02:00
Domen Kožar
b5e76074be
Merge pull request #637 from quentinmit/launchd
Add/fix some launchd.plist options
2023-04-20 18:56:12 +02:00
Quentin Smith
73ab8e0d70 Add/fix some launchd.plist options 2023-04-19 16:09:53 -04: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
Bernardo Meurer
0cf7d41389
fix(modules/fonts): ignore repeated fonts
Without this, attempts to build the fonts dir with repeated font
packages in `fonts.fonts` will yield:

```
ln: failed to create symbolic link '/nix/store/6im9rm87nxc82nqbv350hfp2w7ja1z47-fonts/Library/Fonts/IBMPlexSansThai-Thin.otf': File exists
```
2023-03-28 14:41:20 -03:00
Vadim
8699abe98f
fix(wg-quick): builtins function typo 2023-03-21 13:23:16 +03:00
Glib Shpychka
9f93b19585
feat: support writing arrays to system defaults 2023-03-14 14:50:10 +02:00
Marwan Aljubeh
ca62d93c6c
Only use --force for patches applied in reverse
Using `--forward` already instructs `--patch` to ignore patches that it thinks are reversed or already applied.
2023-03-07 13:37:18 +00:00
Marwan Aljubeh
42e0e4f3b4
Add --force to all patch invocations 2023-03-07 13:35:24 +00:00
Marwan Aljubeh
e62b83a934
Fix system.patches
Currently, `system.patches` doesn't work because it will attempt to first detect if the patch has already been applied by checking if it can be applied in reverse.

However, when that happens, `patch` detects that the supplied patch is incorrectly reversed and attempts to ask the user if they want to "Ignore -R":

```
Unreversed (or previously applied) patch detected!  Ignore -R? [y]
```

Because the output is piped to `/dev/null` the user will basically see nothing and `darwin-rebuild switch` will hang until the user presses "Enter" (possibly to check if the terminal is frozen). At which point, patch will ignore the --reverse and exit successfully, preventing the patch from being applied at all.

This change fixes that bug by using `--force` which tells patch that we know what we're doing and prevents it from prompting the user if they want to ignore `--reverse`.
2023-03-07 12:53:20 +00: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
Robert Hensing
617604488e Add meta.maintainers option 2022-12-22 20:18:53 +01:00
Domen Kožar
adb8ac0453
Merge pull request #452 from psm14/mouse-scaling
add mouse scaling system setting
2022-12-16 13:07:17 +00:00
Domen Kožar
7e7498acfe
Merge pull request #580 from sliminality/add-24h-time
Add option to use 24-hour system time
2022-12-16 13:06:46 +00: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
Slim Lim
6774344719 Add option to set 24-hour time
Normally, the system region setting determines whether the clock uses
12- or 24-hour time. This flag allows users to override this setting and
use 24-hour time even if their region does not.
2022-12-13 15:42:25 -08:00
4825764518
c148d28c67
Add wg-quick module 2022-12-02 20:55:53 -05:00
Domen Kožar
4182ad42d5
Merge pull request #553 from n8henrie/issue_543
Add system terminfo to TERMINFO_DIRS by default
2022-11-15 17:44:04 +00: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
Domen Kožar
21791d4c01
Merge pull request #470 from toonn/berbiche-fix-applications-symlink
Disable taking control of ~/Applications folder MkII
2022-11-01 09:17:24 +00:00
Pavel Shirshov
f34b284d3f fixes #559, #485: workaround for broken fontrestore on Ventura 2022-10-25 22:01:55 +01:00
Pavel Shirshov
c946ee42fa #517: custom preferences for 'defaults' can be specified 2022-10-24 13:12:54 +01:00
Nathan Henrie
ed993c5038 Add system terminfo to TERMINFO_DIRS by default 2022-10-19 15:09:28 -06:00
Andrew Childs
d0121790d4 nix: fix mandatoryFeatures in nix.buildMachines
Copied directly from https://github.com/NixOS/nixpkgs/pull/193404
2022-10-03 12:33:21 +09:00
Graham Christensen
07f640580b rename the nixFlakes reference 2022-09-25 15:43:15 -04:00
James Walker
a2a9f30fee
rename runCommandNoCC 2022-09-25 14:12:08 -04:00
Domen Kožar
be8e20e7d3
Merge pull request #533 from Enzime/terminfo
environment: support installing terminfo files
2022-09-20 13:44:48 +01:00
Domen Kožar
caea6653b1
Merge pull request #531 from Enzime/fix-tailscale
Fix Tailscale module
2022-09-20 13:44:22 +01:00
Domen Kožar
b3de9dded8
Merge pull request #228 from malob/sudo-touchid
Add option to enable sudo authentication with Touch ID
2022-09-20 13:42:31 +01:00
Michael Hoang
f12f0f3095 environment: support installing terminfo files 2022-09-20 21:57:53 +10: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
toonn
ed1e73d01e
applications: Drop store prefix to generalize
While the Nix store is almost always at `/nix/store`, we shouldn't
assume it to be. Checking only the trailing part of the link is less
exact but removes this bad assumption.

I also added a check for the symlink's contents when overwriting it to
more accurately check whether we own it and should replace it.
2022-09-13 14:57:50 +02:00
toonn
fbe795f39d
applications: Symlink Nix Apps to /Applications
This PR supercedes #226.

So far application bundles were always linked to `~/Applications` or
`~/Applications/Nix Apps` if the former was an existing directory.

In nix-community/home-manager#1341 a conflict was found with suggested
new Home Manager behavior, where applications installed through Home
Manager would end up in `~/Applications/Home Manager Apps`. This was in
an attempt to make them discoverable through Spotlight but further
investigation suggest Spotlight does not pick up symlinked apps (details
in the issue).

However, there are other programs that expect to be able to write to
`~/Applications` so taking over the directory is unfortunate.

PR #226 dropped linking `~/Applications` and instead made sure the
directory exists so we can always link in `~/Applications/Nix Apps`.

After further discussion in #macos:nixos.org we came to the conclusion
that we shouldn't link applications to a user directory at all. Since we
manage packages for multiple users, application bundles should go in
`/Applications`.

Because previous code will likely leave a symlink at
`~/Applications/{,Nix Apps}`, which will become dangling once the path
it links to is garbage collected from the store we test to see if a link
exists and it conforms to the path we're expecting and if it does remove
it.
2022-09-13 14:57:46 +02:00
Nicolas Berbiche
9c76fbf20f
Disable taking control of ~/Applications folder
Programs like Steam add applications to ~/Applications and such.

This commit disables linking ~/Applications to nix-darwin Applications
in the /nix/store and makes nix-darwin use a subfolder within
~/Applications.
2022-09-13 14:57:46 +02: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
Domen Kožar
3b69bf3cc2
Merge pull request #498 from malob/improve-homebrew-module
Add ability to configure all known Brewfile line arguments with `homebrew` module
2022-09-06 16:35:28 +01:00
Malo Bourgon
2ddebb3189 Improve documentation of homebrew module 2022-09-01 10:50:23 -07:00
Malo Bourgon
7710d1d7d6 Add global into a submodule
* Add `homebrew.global.autoUpdate` option.
* Remove `homebrew.global.noLock` option, and replace it with
  `hombrew.global.lockfiles`.
2022-09-01 10:50:21 -07: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