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

1873 commits

Author SHA1 Message Date
Emily
db92fac3a9 flake: match NixOS definition of nixpkgs.flake.source
Closes: #1082
2024-09-17 21:24:39 +01:00
Niklas Ravnsborg
2841f49631
fix description typo in dock.nix 2024-09-16 10:54:06 +02:00
Niklas Ravnsborg
3d48a9893a
add finder._FXSortFoldersFirst option 2024-09-16 10:54:05 +02:00
Niklas Ravnsborg
3b087efcbd
add NSGlobalDomain.AppleSpacesSwitchOnActivate option 2024-09-16 10:54:05 +02:00
Emily
21fe31f264
Merge pull request #1075 from emilazy/push-oszxxzpyppzm
version: make `system.stateVersion` mandatory
2024-09-13 01:53:33 +01:00
Emily
122ff62d68
Merge pull request #1072 from antoineco/zsh/no-nix-shell-check
Remove nix-shell early return in /etc/{zshenv,bashrc}
2024-09-12 20:16:27 +01:00
Antoine Cotten
953d02ba59
{bash,zsh}: remove nix-shell early return in /etc/{bashrc,zshenv}
The condition does not match the comment, and therefore not the original
intention. It currently returns early in *any* type of Nix shell, not
just pure ones, including 'nix develop'.

Besides being unnecessary, this check prevents Nix shells from
functioning properly. For instance, it causes the initialization of the
Zsh fpath to be skipped, which is critical. The fact that the user is
unable to opt out of this behaviour makes this an ever bigger problem
since /etc/zshenv is being loaded unconditionally by Zsh.

For reference, NixOS does not perform such check, and apparently never
did.
2024-09-12 17:37:56 +00:00
Emily
04e3cfc822 version: make system.stateVersion mandatory
When testing the Sequoia UID change, I discovered that @mjm
didn’t have `system.stateVersion` set; I suspect this is not too
uncommon. Let’s make it required now, like NixOS is trying to,
to improve our backwards‐compatibility story in anticipation of
starting to cut release branches.
2024-09-12 18:35:10 +01:00
Emily
9d7aebb303
Merge pull request #1073 from emilazy/push-xxvyptqvpqxw
ci/update-manual: use Nixpkgs 24.05
2024-09-12 14:12:07 +01:00
Emily
a0e362a5c9
Merge pull request #1067 from antoineco/module/nixpkgs-flake
Put nixpkgs in NIX_PATH and system registry for flake configs
2024-09-12 11:01:04 +01:00
Emily
6c4aae5a14
Merge pull request #1070 from antoineco/cmd/fix-changelog
Fix darwin-rebuild changelog not displaying
2024-09-12 10:53:59 +01:00
Emily
1380edcdf3
Merge pull request #1071 from antoineco/zsh/fix-children-shells-init
Backport Zsh fpath child shell and nounset fixes from NixOS
2024-09-12 10:46:25 +01:00
Emily
537097b331 ci/update-manual: use Nixpkgs 24.05 2024-09-12 10:41:47 +01:00
Antoine Cotten
b64c1d036f
tools: fix darwin-rebuild changelog
The script returns early when $systemConfig is empty, which prevents the
changelog from being displayed.
2024-09-11 18:27:53 +02:00
Sebastian Reuße
6ad463a764
zsh: don't be noisy when scripts are run with -u
When a script specifies the shell option "nounset" as part of the
shebang (e.g., via "#!/usr/bin/env -S zsh -u"), our initialization
scripts would produce error messages of the form:

    __ETC_FOO_SOURCED: parameter not set

These messages could probably be confusing to users when running such
scripts. By providing a fall-back in the parameter expansion, we can
avoid them.

This patch does not address interactive shell start-up, where such
messages may (or may not) be less problematic.

NixOS/nixpkgs@7d84dbdf5b
2024-09-11 14:07:24 +02:00
Jörg Thalheim
7e6c548eef
zsh: let children shells set their fpath
Currently zshenv by default only sets fpath without exporting it. A
parent shell would also not set those variables usually as they are
shell local.

It also sources a file called set-environment but this is protected by
an environment variable called __NIX_DARWIN_SET_ENVIRONMENT_DONE. Hence
any modification done by the parent shell should persist as long as
__NIX_DARWIN_SET_ENVIRONMENT_DONE is not unset.

This behavior deviates from what we do in bashrc and breaks common
setups such as tmux/mosh or screen.

NixOS/nixpkgs@55819e6c86
2024-09-11 13:01:26 +02:00
Jade Lovelace
8714f9e285
flake: put nixpkgs in NIX_PATH and system registry for flake configs
Currently there are a bunch of really wacky hacks required to get
nixpkgs path correctly set up under flake configs such that `nix run
nixpkgs#hello` and `nix run -f '<nixpkgs>' hello` hit the nixpkgs that
the system was built with. In particular you have to use specialArgs or
an anonymous module, and everyone has to include this hack in their own
configs.

We can do this for users automatically.

NixOS/nixpkgs@e456032add

Co-authored-by: Antoine Cotten <hello@acotten.com>
2024-09-11 08:24:41 +02:00
Michael Hoang
f4f18f3d72
Merge pull request #1069 from emilazy/push-mmluvksnvxpy
{ids,checks}: update for new builder UID/GID values
2024-09-11 15:24:04 +10:00
Emily
88b97aa49c {ids,checks}: update for new builder UID/GID values 2024-09-11 01:17:01 +01:00
Emily
9c60c95008 checks: make oldBuildUsers check fail hard
Checking for the Sequoia stuff won’t work properly if a system is
still in this old state. Best to be loud about it to deal with any
straggler systems that haven’t yet dealt with this issue.
2024-09-11 00:37:08 +01:00
Emily
2af5f0fb9e checks: factor out nix.useDaemon check 2024-09-11 00:37:08 +01:00
Emily
98189683a4 ci: use Determinate Systems installer for stable Nix 2024-09-11 00:37:08 +01:00
Emily
f29c6fc015 ci: use Nix 2.24.6 for unstable jobs
Includes the Sequoia installer fixes.
2024-09-11 00:37:08 +01:00
Emily
bda49fe089 ci: update stable Nixpkgs to 24.05 2024-09-11 00:37:08 +01:00
Emily
8220423c02
Merge pull request #1068 from emilazy/push-lkuxlvpkttsn
tests/{networking-hostname,users-groups}: update for `lib.escapeShellArg` change
2024-09-11 00:32:33 +01:00
Emily
4c96bd694b
Merge pull request #1066 from antoineco/zsh/fpath
Backport Zsh fpath mangling from NixOS
2024-09-10 23:31:41 +01:00
Emily
95f063ea06 tests/users-groups: update for lib.escapeShellArg change 2024-09-10 22:50:01 +01:00
Emily
dea497f67a tests/networking-hostname: update for lib.escapeShellArg change 2024-09-10 22:11:20 +01:00
Sebastian Reuße
15f64efcaf
zsh: prefer Nix completions these from Zsh package
Zsh ships some rudimentary completions for programs where upstream also
ships their own completions (e.g., curl). So as not to shadow those
completions, we need to prepend to the fpath instead of appending.

NixOS/nixpkgs@8dad5a2239
2024-09-10 21:40:11 +02:00
Jan Malakhovski
4d59f660bc
zsh: move fpath init from /etc/zshrc to /etc/zshenv
We want these to be set even when /etc/zshrc loading is disabled.

NixOS/nixpkgs@f70e3f3738
2024-09-10 21:35:35 +02:00
Michael Hoang
5b2d8e9a47
Merge pull request #1064 from natsukium/fix/typo
checks.nix: fix typo
2024-09-10 23:37:57 +10:00
natsukium
ec76c31dbd
checks.nix: fix typo 2024-09-10 22:20:22 +09:00
Michael Hoang
7655918380
Merge pull request #1055 from siriobalmelli/sb/fix/github-runners
nixos/github-runner: fix build failure
2024-09-06 23:21:49 +10:00
Sirio Balmelli
c334175319
nixos/github-runner: quote comma separators so as to pass shellcheck
Shellcheck complains:

       > args=(
       >      ^-- SC2054 (warning): Use spaces, not commas, to separate array elements.

Quote the --labels argument to resolve.

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
2024-09-06 14:57:35 +02:00
Emily
a55b3f1ab4
Merge pull request #1059 from emilazy/push-oooqqvvowrxt
users: allow arbitrary group IDs
2024-09-05 14:51:52 +01:00
Emily
97e0f72759 users: allow arbitrary group IDs
The upstream Nix UID/GID changes for Sequoia will require us to manage
a group with GID 350. That will require more work on our end to ensure
compatibility and a working migration path, but this is enough to
allow hacking around it locally in system configurations for now.
2024-09-05 10:39:01 +01:00
Michael Hoang
92bd25c29f
Merge pull request #1058 from Enzime/linux-builder-apply
linux-builder: make `package.nixosConfig` accurate
2024-09-05 16:11:19 +10:00
Michael Hoang
e1b6f307ec linux-builder: make package.nixosConfig accurate 2024-09-05 13:54:53 +10:00
Michael Hoang
7c4b53a7d9
Merge pull request #1051 from booxter/suppress-gpg-connect-agent-stderr
gpg: Suppress stderr from gpg-connect-agent on shell init
2024-09-01 21:15:02 +10:00
Michael Hoang
c8d3157d1f
Merge pull request #1050 from coreyjewett/master
Add sha256 for DeterminateSystems Nix installer 0.22.0
2024-08-30 15:14:53 +10:00
Ihar Hrachyshka
75d14c62cb gpg: Suppress stderr from gpg-connect-agent on shell init
In some scenarios, the command may fail, e.g. when the shell is executed
with a different $HOME from where gpg agent is configured to run from.

(E.g. this happens in kitty terminal test suite.)

This patch will suppress stderr errors on tty in this situation.

Note that zsh does not allow to suppress execution of /etc/zshenv on
startup, so it's impossible to skip it in the test suite environment.

An alternative would be to set IN_NIX_SHELL in the test suite, but this
was rejected in upstream:

https://github.com/kovidgoyal/kitty/pull/7800

There's also a kitty package specific fix posted here but this may be
unnecessary once nix-darwin is patched here:

https://github.com/NixOS/nixpkgs/pull/338070

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2024-08-29 16:37:56 -04:00
Corey Jewett
544db3691c Add sha256 for DeterminateSystems Nix installer 0.22.0 2024-08-29 10:51:52 -07:00
Michael Hoang
ac5694a0b8
Merge pull request #1044 from Enzime/add/known-hash
etc: add known hash for DetSys installer 0.20.0+
2024-08-25 14:56:10 +10:00
Michael Hoang
2bd4949af3 etc: add known hash for DetSys installer 0.20.0+ 2024-08-25 14:36:37 +10:00
Michael Hoang
ea319a7379
Merge pull request #1042 from Enzime/update/README
Use flake based command for uninstaller in README
2024-08-24 13:25:41 +10:00
Michael Hoang
2861a0421b Use flake based command for uninstaller in README
Fixes #918

This command should work on both non-flake and flake based setups as it
does not require `nixpkgs` to be set in `NIX_PATH`.

Also remove the manual install section as it is unmaintained as far as I
can tell.
2024-08-24 13:07:05 +10:00
Michael Hoang
a8968d88e5
Merge pull request #1038 from isabelroses/installTools
feat: system.disableInstallerTools
2024-08-22 14:09:15 +10:00
isabel
c06794de03
feat: system.disableInstallerTools 2024-08-21 14:29:54 +01:00
Daiderd Jordan
d6703b9887
Merge pull request #1039 from Enzime/add/funding
.github: add sponsorship details
2024-08-21 07:58:18 +02:00
Michael Hoang
8ef57d17a4 .github: add sponsorship details 2024-08-21 10:32:59 +10:00