Commit graph

2319 commits

Author SHA1 Message Date
Michael Hoang
be2d7d6535 applications: ensure sufficient permissions before updating apps 2025-06-21 14:54:32 +07:00
‮rekcäH nitraM‮
1f9cca7781 Copy applications instead of linking them to make macOS happy
All existing attempts fell short.
So we fall back to plain old copying applications over.

Problems with alternatives:

- Symlinking: Spotlight doesn't index symlinks. Therefore one cannot use
Spotlight to find or open the apps. Also they don't show up in
LaunchPad.

- Trampolines: Apples Security & Privacy doesn't get the concept and
shows them with the wrong name. Having an app open during an update will
also make it show up twice in the Dock.

- Aliasses: Require either AppleScript (a permission we don't want to
have, as it easily bypasses Apples TCC) or extra tools (that would be
ok), but also Aliasses are not categorized as 'Application' by
SpotLight.

- Directory Hardlinks are not supported by APFS - but also wouldn't work
cross volume.

- clonefile also doesn't work cross-volume.

Which all leads us back to Don Copine and Pastone. *sigh*
2025-06-21 14:54:32 +07:00
‮rekcäH nitraM‮
21d733a51f applications: reformat 2025-06-21 14:54:24 +07:00
Michael Hoang
0d71cbf88d
programs/ssh: backport knownHosts changes (#1517) 2025-06-19 09:27:36 +00:00
Michael Hoang
82566dd254 programs/ssh: remove with lib; 2025-06-19 16:08:37 +07:00
Michael Hoang
a991859d1f nixos/ssh: undeprecate knownHosts.«name».hostNames
Backport e9f17a9f45

Co-authored-by: pennae <github@quasiparticle.net>
2025-06-19 16:08:09 +07:00
Michael Hoang
9d5b27bc93 modules/programs/ssh: knownHosts -> extraKnownHosts
Backport 8fa2e787f1

Co-authored-by: Taeer Bar-Yam <taeer@bar-yam.me>
2025-06-19 16:07:11 +07:00
Michael Hoang
2d257c09a1 programs.ssh.knownHosts: update example to be an attrset
Backport 4f11c06fac

Co-authored-by: Florian Klink <flokli@flokli.de>
2025-06-19 16:05:09 +07:00
Michael Hoang
04b04f4b9d programs/ssh: move to match path in NixOS 2025-06-19 10:45:32 +07:00
Garrett Hopper
f67a4856c3 Update homebrew module documentation and examples
- Replace deprecated homebrew/cask-fonts with apple/apple tap example
- Update documentation links from archived homebrew-bundle to brew.sh/Brew-Bundle-and-Brewfile
- Update source file references to new location in main brew repository
2025-06-17 05:52:35 -05:00
Sam
2f140d6ac8
Preserve PATH variable when using sudo for Homebrew (#1503) 2025-06-14 04:00:26 +00:00
Brian Romanko
0721726e21
Wrap the call with env 2025-06-13 16:49:58 -07:00
Brian Romanko
300af6fcc5
Preserve PATH variable when using sudo
Some systems set `secure_path` in sudoers. When this is set
the `PATH` variable is not set in the sudo environment. Using
`--preserve-env=PATH` ensures that the PATH env var is set properly
in those systems.

This is similar to the issue with [darwin-rebuild](https://github.com/nix-darwin/nix-darwin/issues/798)
not working with sudo on these systems.
2025-06-13 16:49:57 -07:00
Emily
72c88d5928
Avoid confusing users with future deprecations (#1499) 2025-06-12 14:47:19 +00:00
Sam
e2da3338ab
etc: add known hashes for zprofile and zshrc in macOS 26 beta 1 (#1510) 2025-06-12 06:51:43 +00:00
Sam
63c31af37a
etc: add known hashes for zprofile and zshrc in macOS 26 beta 1
This also includes versions of /etc/zshrc with both the official and
DeterminateSystems installers.
2025-06-11 01:43:35 -07:00
Sam
19346808c4
programs/direnv: fix silent option (#1491) 2025-06-06 07:19:53 +00:00
Duc Nghiem-Xuan
daf8e22831 programs/direnv: add finalPackage readonly option 2025-06-06 15:49:37 +09:00
Sam
9753a8706b
feat: add option programs.zsh.enableAutosuggestions (#1433) 2025-06-06 06:02:11 +00:00
Duc Nghiem-Xuan
fb27326bbc programs/direnv: fix silent option 2025-06-05 17:49:17 +09:00
Sam
fa6120c32f
defaults: support AppleKeyboardUIMode = 2 for newer macOS versions (#1501) 2025-06-04 04:52:25 +00:00
Michael Hoang
f6b29e4af8 defaults: support AppleKeyboardUIMode = 2 for newer macOS versions 2025-06-04 11:02:16 +10:00
Michael Hoang
d46a07214f
Fix ShellCheck escaped character issue in nixPath check (#1500) 2025-06-04 00:56:23 +00:00
Ethan Turkeltaub
b07a4c8be5
Fix ShellCheck issue in nixPath check 2025-06-03 16:19:03 -04:00
Adam C. Stephens
7c284a6504
Avoid confusing users with future deprecations 2025-06-02 09:55:31 -04:00
Emily
44a7d0e687
darwin-rebuild: use NIX_REMOTE=daemon even as root (#1458) 2025-05-27 13:33:47 +00:00
Michael Hoang
a9939228f6
config/system-path: restructure to mirror NixOS (#1481) 2025-05-25 05:00:28 +00:00
Michael Hoang
9f609d1d9f
ci: enable merge queue (#1482) 2025-05-25 04:31:32 +00:00
Michael Hoang
0d3dcc55f3 ci: enable merge queue 2025-05-25 14:14:52 +10:00
Michael Hoang
cd6a8a796d config/system-path: restructure to mirror NixOS
2795c506fe/nixos/modules/config/system-path.nix
2025-05-25 14:06:56 +10:00
Michael Hoang
e0a7c37735
config/terminfo: init module (#1479) 2025-05-25 09:50:52 +10:00
Michael Hoang
5374405a01 config/terminfo: init module 2025-05-25 09:24:12 +10:00
Michael Hoang
acd6aa5a90
programs/arqbackup: init module (#1474) 2025-05-24 15:40:10 +10:00
Michael Hoang
7347f72507 programs/arqbackup: init module 2025-05-24 15:16:24 +10:00
Robert Hensing
30845beee0 nix.nixPath: Do not use environment.darwinConfig if set to null
I've personally set it to `null` to make my `system.primaryUser = null;`
configuration work on a machine with `stateVersion = 4;`.

It may apply in other use cases as well.
2025-05-23 16:51:36 +02:00
Emily
33220d4791
system.build: Treat as variables, make lazy, fix error message (#1468) 2025-05-23 13:44:11 +01:00
Robert Hensing
acf6b46011 system.build: Treat as variables, make lazy
This fixes an unnecessary evaluation dependency that prevented the
custom and much appreciated primaryUser error from popping up.

Specifically:

       … while evaluating the option `system.build':

       … while evaluating definitions from `/nix/store/lc6n4bhxj9255kzfn9pnpx65583a8cgc-source/modules/environment':

       … while evaluating definitions from `/nix/store/lc6n4bhxj9255kzfn9pnpx65583a8cgc-source/modules/nix':

       … while evaluating the option `environment.darwinConfig':

       … while evaluating the option `system.primaryUserHome':

       error: expected a string but found null: null
       at /nix/store/lc6n4bhxj9255kzfn9pnpx65583a8cgc-source/modules/system/primary-user.nix:26:30:
           25|       default =
           26|         config.users.users.${config.system.primaryUser}.home or "/Users/${config.system.primaryUser}";
             |                              ^
           27|     };

While it did have some indication as to the cause, it lets the good
error message go to waste.

**Context**

`lazyAttrsOf` is the better choice when you use an attrset as individual
variables instead of in aggregate (e.g. `attrNames`, `toJSON`).

The reason is that an expression like `a.b` is strict in `a`, which
entails the evaluating the _whole_ set of attribute _names_ in `a`.
In the `attrsOf` this means evaluating all `mkIf` conditions, which
in turn also means evaluating all the regular definitions to the
smallest degree (WHNF) to determine that they're not `mkIf`s.

`lazyAttrsOf` simply assumes that all attributes aren't `mkIf false`,
and throws an error in the attribute value if necessary.
This would be a problem with `toJSON` and such, but is completely
fine when the attributes are treated as variables of a lazy program,
as is the case here.

**NixOS**

NixOS made `system.build` a submodule with a `freeformType`, allowing
the things inside of it to be declared, and for them to have niceties
like documentation and merging behavior.
nix-darwin could probably adopt this.
2025-05-23 12:00:51 +02:00
Michael Hoang
93562b65cf
feat(services.openssh): add extraConfig option (#1465) 2025-05-23 01:41:14 +00:00
squat
0e3b855456
add test
Signed-off-by: squat <lserven@gmail.com>
2025-05-23 02:58:23 +02:00
squat
e09c1aefe4
feat(services.openssh): add extraConfig option
Same interface as in NixOS: https://search.nixos.org/options?channel=unstable&show=services.openssh.extraConfig&from=0&size=50&sort=relevance&type=packages&query=services.openssh.extraConfig
This is useful to customize the behavior of the SSH daemon, e.g. to add
options like `StreamLocalBindUnlink yes` to improve gpg-agent
forwarding.

Signed-off-by: squat <lserven@gmail.com>
2025-05-22 20:22:47 +02:00
Michael Hoang
e2676937fa
flake.lock: update (#1463) 2025-05-21 09:36:44 +00:00
Emily
0b5fee1285 flake.lock: update
Should fix the website build.
2025-05-21 10:05:49 +01:00
Emily
9ed53ae9ab
version: bump to 25.11 (#1449) 2025-05-20 15:45:13 +01:00
Emily
d23a9c26f3 darwin-rebuild: use NIX_REMOTE=daemon even as root 2025-05-19 18:26:49 +01:00
Michael Hoang
b9b927dd1f
Update repo links (#1450) 2025-05-18 08:45:43 +10:00
Siddhartha Sahu
24952f03f9
Update default.nix 2025-05-17 12:15:49 -04:00
Siddhartha Sahu
58f268e065
Update CHANGELOG 2025-05-17 12:15:18 -04:00
Siddhartha Sahu
a4cc54778d
Update repo link 2025-05-17 12:14:14 -04:00
Emily
0c0f423db8 version: bump to 25.11 2025-05-17 16:06:23 +01:00
Emily
8e251e4534
The Plan, phase 1 (#1341) 2025-05-17 16:02:22 +01:00