1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-06 08:47:00 +00:00
Commit graph

172 commits

Author SHA1 Message Date
Emily
62ba0a2242
Merge pull request #1282 from emilazy/push-uqnyoyklywvo
nix-tools: drop `nixPackage`, overwrite `$PATH` rather than prepending, set `$NIX_PATH`
2025-01-26 21:26:41 +00:00
Emily
46d0fa4ded
Merge pull request #1279 from emilazy/push-tstmztlwwouo
darwin-uninstaller: remove `darwin` channel from `root` too
2025-01-21 01:33:50 +00:00
Emily
b5b7888793 nix-tools: set $NIX_PATH
This will be important once most users are running `sudo
darwin-rebuild` and therefore not getting their environment’s
`$NIX_PATH` passed through.
2025-01-20 05:29:44 +00:00
Emily
4d0ae6980d nix-tools: overwrite $PATH rather than prepending
I don’t see any reason for these scripts to depend on more
environmental state than necessary.
2025-01-20 05:29:44 +00:00
Emily
3d95b01351 nix-tools: make systemPath more readable 2025-01-18 20:33:10 +00:00
Emily
02232f71c5 nix-tools: drop nixPackage
We already put `/nix/var/nix/profiles/default/bin` on the `$PATH`,
and whatever `nix.package` is set to already gets installed into
`/run/current-system/sw/bin`, so this is pointless.
2025-01-18 20:31:54 +00:00
Emily
5665d6c05e darwin-rebuild: pass ${extraBuildFlags[@]} to nix-instantiate
Theoretically required for `darwin-rebuild edit -I darwin-config=…`,
I guess. We also shouldn’t run it for flake‐based setups.
2025-01-18 20:01:22 +00:00
Emily
94adbd6259 darwin-uninstaller: remove darwin channel from root too 2025-01-18 19:38:34 +00:00
Emily
3924b55553
Merge pull request #1277 from emilazy/push-yxsrvorpzlor
{environment,nix-tools}: correct default `$PATH` ordering to match macOS
2025-01-18 01:11:06 +00:00
Emily
ff1d6384df {environment,nix-tools}: correct default $PATH ordering to match macOS 2025-01-15 23:26:14 +00:00
Emily
c5b7b604ca darwin-rebuild: remove code for macOS < 11 2025-01-14 15:56:20 +00:00
Emily
8f4f3d8d2d darwin-uninstaller: remove code for macOS < 11 2025-01-14 15:56:20 +00:00
Michael Hoang
89928cb531
Merge pull request #1173 from Enzime/push-rzlnwqmnznpp
nix-tools: set `meta.mainProgram`
2024-11-23 01:10:45 +00:00
Michael Hoang
60ed03d0b1 installer: remove 2024-11-21 11:07:47 +11:00
Michael Hoang
65ea368ebb installer: move channel creation to README 2024-11-21 11:07:47 +11:00
Michael Hoang
9a1bea70d5 installer: move creating default configuration to README 2024-11-21 11:07:47 +11:00
Michael Hoang
23f312e48a nix-tools: set meta.mainProgram 2024-11-18 10:43:28 +11:00
Michael Hoang
ec5fce6061 uninstaller: check nix-daemon works after restoring 2024-11-17 01:11:27 +11:00
Michael Hoang
e07f08c0dc uninstaller: fix restoring nix-daemon launchd daemon 2024-11-17 01:11:27 +11:00
Michael Hoang
698414e409 nix-daemon: enable by default
Single user installs have been unsupported by the official Nix installer
since 2.4.
2024-11-16 23:19:11 +11:00
Michael Hoang
050b7db445 installer: don't tell users to source bashrc
Fixes #380
2024-11-09 22:00:43 +11:00
Michael Hoang
3a89b61432 uninstaller: check nix-daemon was correctly reinstalled 2024-11-07 18:52:15 +11:00
Michael Hoang
ebca0c23c9 uninstaller: switch to writeShellApplication
By not defining a `shellHook`, `nix-shell -A uninstaller` and
`nix-shell -A uninstaller.check` no longer work.
2024-11-07 18:52:15 +11:00
Michael Hoang
c3b406bd1c uninstaller: restore *.before-nix-darwin files
Fixes https://github.com/LnL7/nix-darwin/issues/911
Fixes https://github.com/LnL7/nix-darwin/issues/912
2024-11-07 18:17:34 +11:00
Michael Hoang
9cd45289c9 uninstaller: reset any shells pointing to /run/current-system/sw/bin 2024-11-07 18:17:34 +11:00
Michael Hoang
1b5fa6be40 uninstaller: remove unnecessary attempt to delete nix-daemon
Fixes https://github.com/LnL7/nix-darwin/issues/910
2024-11-07 18:17:34 +11:00
Michael Hoang
84ad3a2d7e uninstaller: remove /run symlink 2024-11-07 18:17:34 +11:00
Michael Hoang
1d8c91b40e darwin-rebuild: do not resolve flake path
Backport of c274d045ac

Fixes #549
2024-11-03 12:56:25 +11:00
Michael Hoang
406cb56d06 Back out "Add support for submodules in flakes"
This backs out commit 5452c8c638.
2024-11-03 12:56:25 +11:00
Michael Hoang
fd6660cb91 tests: fix negative asserts with grep not working
Using `grep -v` without `-z` will return 0 even if there is a match
found as all the non-matching lines will be matched. Instead of using
`grep -vqz`, `(! grep ...)` is more readable.

The brackets are necessary as `! grep` will not trigger `set -e`[0], so we
run it inside a subshell to use its non-zero exit code.

[0]: https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#The-Set-Builtin
2024-10-27 21:26:19 +11:00
Michael Hoang
7840909b00
Merge pull request #1115 from PhilipBorgesen/align_usage
darwin-rebuild: Align usage description with implementation
2024-10-25 14:25:25 +11:00
Philip Børgesen
c98bb238b1 darwin-rebuild: Align usage description with implementation
This change updates the usage description of darwin-rebuild.sh as
follows:

 * Add options:

     --print-build-logs / -L
     --no-registries
     --commit-lock-file
     --no-write-lock-file
     --override-input

 * Specify that --no-flake and the flake related options are
   mutually exclusive.

 * Specify that --keep-going and -k are aliases.

 * Specify that --keep-failed and -K are aliases.

 * Correct the description of --update-input; only one value follows.

The --no-build-hook argument remains undocumented, like for nix.
2024-10-25 05:07:51 +02:00
Michael Hoang
8c02940d70 users: ensure Full Disk Access is granted before trying to delete users 2024-10-23 01:29:01 +11:00
Michael Hoang
9ee30f2534 darwin-rebuild: add comments explaining the custom sudo logic 2024-10-23 01:11:40 +11: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
Michael Hoang
902d6b65d3 Set default flake directory as /etc/nix-darwin
Backported from 9995a5d59c/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh (L349-L353)
2024-07-13 14:14:11 +10:00
Rubikoid
24f7a3fdf4
Move --offline to group of same behaviour flags 2024-05-18 16:25:53 +03:00
Rubikoid
2a2a311fca
Fix help 2024-05-07 16:02:26 +03:00
Rubikoid
3524643c3d
Fix --offline
Add --substituters flag
2024-05-07 16:02:26 +03:00
Rubikoid
bb17a88bc0
Add offline flag to darwin-rebuild.sh 2024-05-07 16:02:26 +03:00
Andrew Marshall
5c2700533c darwin-uninstaller: Fix when using nixpkgs.config.allowAliases = false 2024-03-06 08:04:42 -05:00
Thane Gill
492944b0f2
Update darwin-rebuild.zsh-completions
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
2024-01-28 18:12:36 -08:00
Thane Gill
0f0478efa6 Add zsh completions to darwin-rebuld by default 2024-01-27 19:37:27 -08:00
Rafael Kitover
f81fbc2bf7
darwin-rebuild: fix sudo invocation on High Sierra
The version of sudo on macOS 10.13 High Sierra does not support the
`--preserve-env=LIST` option syntax, which is used here to preserve
PATH.

Override sudo with a shell function that checks for the availability of
this option syntax, and do not pass PATH otherwise.

Also move the prefix env command in the sudo invocations into the new
sudo function.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-12-22 14:40:13 +00: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
Roman Novak
a4b4cf70dc
Update pkgs/nix-tools/darwin-rebuild.sh
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
2023-11-09 18:09:45 +01:00
Roman Novak
26a59d504b
fix(#798): darwin-rebuild support for Cyberark EPM
restore sudo environment PATH when Cyberark EPM is setting secure_path in sudo config. Fixes LnL7/nix-darwin/issues/798
2023-11-06 10:24:41 +01:00
zowoq
ab817e5d0e darwin-rebuild: add -H to sudo for $systemConfig/activate 2023-09-25 14:02:52 +10:00
Carl Thomé
22419fddf7
Use LocalHostName 2023-09-19 00:59:27 +02:00
Arvin Sevilla
d21a7e30e6
Update pkgs/darwin-installer/default.nix
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
2023-08-13 18:04:12 +08:00