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

143 commits

Author SHA1 Message Date
Martin Hardselius
1f8eb9b128
Add nix flags to subcommand test
This change removes the need for having

  experimental-features = nix-command flakes

in nix.conf. It should also work outside of flake directories.
2021-03-23 09:49:47 +01:00
Martin Hardselius
4187519820
Make nix flake info fix backwards compatible
This change handles previous nix versions by testing for the presence of
the `metadata` subcommand and falling back on the `info` subcommand if
it does not exist.
2021-03-22 22:17:48 +01:00
Martin Hardselius
93752a83ea
Fix nix flake info error
Fixes "error: 'info' is not a recognised command'"

Issue: #307
2021-03-21 23:54:10 +01:00
Mario Rodas
e78f90f795 darwin-[un]installer: Don't reference deprecated stdenv.lib
`stdenv.lib` has been deprecated, and the correct approach is to use
`lib` directly through `pkgs.lib`.
2021-02-23 04:20:00 +00:00
Daiderd Jordan
8834df4317
installer: silence apfs.util output
Passing incorrect flags prints help output to stdout so silence
everything.

Fixes #264
2020-12-22 10:14:02 +01:00
Daiderd Jordan
f8a04c7f6d
installer: move channel setup out of activation
Fixes #234
2020-12-21 14:23:25 +01:00
Daiderd Jordan
6dd655466d
installer: remove profile step 2020-12-19 12:38:06 +01:00
Daiderd Jordan
f47083bd71
installer: extend test with shell environment checks 2020-12-18 14:53:09 +01:00
Daiderd Jordan
75cab75c22
installer: ensure /etc/static runs last
In the case that nix-darwin was installed for a single user installation
and later nix gets reinstalled with the daemon it's possible that
nix-daemon.sh loads afterwards, resulting in unexpected behaviour.
2020-12-18 14:53:08 +01:00
Daiderd Jordan
c6f44ea7ff
installer: handle apfs.util on macOS 11.0 Big Sur
The flages of apfs.util changed in 11.0 so try both cases.

Fixes #249
2020-11-15 15:17:13 +01:00
Daiderd Jordan
8800c4717d
always prefix flake with darwinConfigurations 2020-10-21 18:30:57 +02:00
Daiderd Jordan
c8b38819b4
handle --print-build-logs for flakes 2020-10-21 18:30:57 +02:00
Daiderd Jordan
e4c3940e2d
add --impure flag for flakes 2020-10-21 18:30:57 +02:00
Daiderd Jordan
d865c6ae4c
add example flake and support --flake in darwin-rebuild 2020-10-21 18:30:57 +02:00
Daiderd Jordan
943a6b25d7
Merge pull request #215 from basvandijk/installer-correct-referencees
darwin-[un]installer: make sure all dependencies are part of the closure
2020-08-26 18:21:07 +02:00
Alexandre Esteves
a6f47f87f1
Fix typo 2020-08-26 13:19:51 +01:00
Bas van Dijk
03d3931656 darwin-[un]installer: make sure all dependencies are part of the closure
This makes sure the `darwin-installer` and `darwin-uninstaller`
packages can be nix copied to any target and reliably be executed
there.
2020-08-21 21:22:09 +02:00
Daiderd Jordan
47fe6db9c9
darwin-installer: configure zsh 2020-06-17 19:37:33 +02:00
James Ottaway
32fa78821f Only enable services.nix-daemon when no config is present upon install 2020-05-17 21:58:35 +10:00
Daiderd Jordan
80a8a591a9
installer: try creating /run using synthetic.conf
Since macOS 10.15 Catalina / can't be changed directly anymore.

Fixes #166
2020-03-28 19:12:21 +01:00
Daiderd Jordan
590e9c872a
darwin-rebuild: allow empty arguments
The wrapper already handles whitespace properly and empty values are
useful for certain flags like --option builders ''.
2020-02-03 22:49:46 +01:00
Daiderd Jordan
3ec36dd667
darwin-installer: add missing shebang
Unclear in which conditions this does or doesn't work but using a
shebang is best practice and ensures an ancient version of bash isn't
used.

Fixes #179
2019-12-14 18:13:33 +01:00
Daiderd Jordan
462a17b1f1
installer: detect multi-user install 2019-07-01 23:02:29 +02:00
Daiderd Jordan
bbedef2143
darwin-rebuild: fix check 2019-07-01 22:42:44 +02:00
Domen Kožar
48a9159b35
darwin-installer: use --show-trace
This saved me some debugging
2019-06-25 19:50:37 +02:00
Daiderd Jordan
7aa0ad23f4
darwin-rebuild: fix activate without an existing profile 2019-06-05 23:23:59 +02:00
Daiderd Jordan
24089a93d7
darwin-rebuild: add activate command
This command activates the current system again, mostly useful when the
system was built on another host and substituted.
2019-06-05 22:59:23 +02:00
Daiderd Jordan
ae58eb80d2
nix-script: remove 2019-06-05 21:45:47 +02:00
Daiderd Jordan
3c4a001d99
nixos-rebuild: change default editor to vi 2019-06-05 21:45:47 +02:00
Daiderd Jordan
71c68087e8
darwin-rebuild: fix quoting 2019-06-05 21:45:46 +02:00
Daiderd Jordan
2cda9f7113
darwin-option: add support for -I 2019-05-01 13:26:04 +02:00
Daiderd Jordan
d00d00998e
darwin: replace usages of nix-instantiate --eval with --find-file 2019-02-24 22:27:41 +01:00
Daiderd Jordan
132a7f0a09 users: increase default nixbld users to 32 and set knownUsers by default
Since the users.nix.configureBuildUsers target nixbld users, don't require
them to be added to knownUsers explicitly.
2019-02-21 23:15:09 +01:00
Daiderd Jordan
34a6eca033
Revert "installer: add NIX_PATH fallback in <darwin> lookup"
This reverts commit 06f8d83f60.
2018-10-27 00:14:38 +01:00
Daiderd Jordan
63dfbc93d5
installer: include channels in bootstrap NIX_PATH 2018-10-26 17:47:45 +01:00
Daiderd Jordan
06f8d83f60
installer: add NIX_PATH fallback in <darwin> lookup
The nix.nixPath option doesn't include everything, some paths are added
dynamically now.
2018-10-26 17:09:19 +01:00
Daiderd Jordan
79d356909b
installer: don't use pure PATH for editor
For the rest of the installer we want to make sure nothing installed by
the user interferes, however a user's editor might be installed
anywhere.
2018-10-26 09:10:28 +01:00
Daiderd Jordan
803bf18141
uninstaller: continue if removing channel fails and make nix-daemon reload more robust
Kind of a workaround, but failing to remove the channel isn't a big
deal.
2018-09-14 22:32:49 +02:00
Daiderd Jordan
75add386d3
installer: prefer nix from default profile
Using a nix 2.1 nix-channel/nix-env with a 2.0 nix-daemon doesn't work
because the buildenv implementation was moved to the daemon.  This means
the nix version of the target darwin system can't be used because the
daemon isn't upgraded yet.

    error: unsupported builtin function 'buildenv'
2018-09-14 22:29:08 +02:00
Daiderd Jordan
958ebb7966
darwin-rebuild: don't run nix-build for edit 2018-08-03 20:16:43 +02:00
zimbatm
a25d345a7e darwin-rebuild edit
As a user I don't want to remember where the configuration exists. This
adds a command that will point the $EDITOR to the <darwin-config> file.

    darwin-rebuild edit
2018-08-03 15:13:42 +01:00
Daiderd Jordan
a893723b95
activation: fix missing /sbin entries in PATH 2018-08-01 21:08:13 +02:00
Kirill Elagin
45f0e832cd fixup! installer and activation: Sanitise PATH 2018-06-29 19:05:57 +03:00
Kirill Elagin
26bab2fd32 installer and activation: Sanitise PATH
This makes sure that the installation and activation processes are “pure”,
i.e. they use only binaries from nixpkgs or ones that come with macOS.

Closes #86.
2018-06-29 18:51:41 +03:00
Kirill Elagin
2fec230ccc installer: Bring our own nix-instantiate 2018-06-29 15:15:35 +03:00
Daiderd Jordan
49b899dd97
installer: make configuration writable
If the installer is built from a channel or url the example is copied
from the store and won't have write permissions.
2018-04-14 00:28:11 +02:00
Daiderd Jordan
a8847b28e7
darwin-option: improve default/example printing 2018-03-29 22:34:35 +02:00
Daiderd Jordan
6f1c1049dd
installer: fallback to a default editor 2018-01-24 22:37:40 +01:00
Daiderd Jordan
e431dd78a2
uninstaller: don't fail on nix-daemon checks 2018-01-18 18:51:46 +01:00
Daiderd Jordan
c5ecf11b57
uninstaller: fix removal of /run/current-system 2018-01-17 22:16:48 +01:00
Daiderd Jordan
6f45339cfe
uninstaller: add post check 2018-01-17 22:00:05 +01:00
Daiderd Jordan
fc3a096f67
uninstaller: remove darwin channel 2018-01-17 21:34:01 +01:00
Daiderd Jordan
c2728318fb
installer: add post check 2018-01-17 21:31:47 +01:00
Daiderd Jordan
64a46b7164
uninstaller: add header 2018-01-16 00:58:13 +01:00
Daiderd Jordan
02725e220a
installer: fix editor check 2018-01-16 00:58:12 +01:00
Daiderd Jordan
e2acb8f82a
uninstaller: run on travis 2018-01-15 08:51:04 +01:00
Daiderd Jordan
6e42f63784
uninstaller: init 2018-01-15 01:12:26 +01:00
Daiderd Jordan
ac238d0323
installer: ask to edit configuration before installing
This is skipped when stdin is not a tty, unlike the other interactive
parts that look at stdout.
2018-01-14 19:08:02 +01:00
Daiderd Jordan
d31dbefca7
installer: configure build users 2018-01-14 17:18:10 +01:00
Daiderd Jordan
d107dfbc3a
installer: move /run creation 2018-01-14 16:07:46 +01:00
Daiderd Jordan
850dc95145
installer: fix patch 2018-01-14 16:07:46 +01:00
Daiderd Jordan
977ed04a60
installer: setup /run 2018-01-13 23:33:27 +01:00
Daiderd Jordan
9dd2d679cb
installer: add --check flag 2018-01-13 23:33:27 +01:00
Daiderd Jordan
32481b542b
installer: init 2018-01-13 23:33:27 +01:00
Daiderd Jordan
6ea3f405e8
darwin-rebuild: add --list-generations flag 2017-10-20 21:45:31 +02:00
Daiderd Jordan
b7e4b03bee
darwin: add changelog command 2017-07-24 23:12:07 +02:00
Daiderd Jordan
79b180249a
darwin: add check as command for darwin-rebuild 2017-07-24 23:12:07 +02:00
Daiderd Jordan
6d91e5b565
darwin: add --check flag 2017-07-23 18:02:08 +02:00
Daiderd Jordan
32bfad7cc6
darwin-rebuild: add support for --rollback and --switch-generation 2017-05-15 21:16:09 +02:00
Chris Hodapp
8637e7a92f Better no-args darwin-options output
There isn't a man page and it's useful to print out the list of
top-level keys.
2017-05-12 00:34:49 -07:00
Daiderd Jordan
c7d92b852e
darwin-rebuild: run user activation first
Some of the activation scripts use /run/current-system as a reference
for things that should be removed. The symlink is updated by the system
activation script thus it should run last.
2017-05-11 21:36:57 +02:00
Daiderd Jordan
c363720616 lnl: update vim ycm/pymode settings 2017-04-13 07:32:07 +02:00
Daiderd Jordan
258cda10ce
darwin-rebuild: keep result symlink when running build 2017-03-04 20:00:23 +01:00
Daiderd Jordan
57c0c8a112
allow -j4 style flag for darwin-rebuild and the nix wrapper 2017-01-24 21:47:34 +01:00
Daiderd Jordan
40eb4254d5
nix-script: add nix-env operations 2017-01-20 23:31:42 +01:00
Daiderd Jordan
77f947c0dc
darwin-rebuild: add --keep-going 2017-01-10 21:41:18 +01:00
Daiderd Jordan
a85194aa33
nix-script: fix shell -p 2017-01-02 08:19:22 +01:00
Daiderd Jordan
89daf6bf9e
nix-script: improve expresions 2016-12-28 01:18:50 +01:00
Daiderd Jordan
ba674c8bb4
nix-script: don't add src for all commands 2016-12-27 20:51:34 +01:00
Daiderd Jordan
563a2b35b7
nix-script: rename 2016-12-27 20:30:13 +01:00
Daiderd Jordan
a40eb003e1
nix-script: improve commands with and expression 2016-12-27 20:28:25 +01:00
Daiderd Jordan
3ec1300c67
nix-script: resolve drv path 2016-12-26 23:55:23 +01:00
Daiderd Jordan
bc5fc1af32
add nix-script 2016-12-26 23:34:09 +01:00
Daiderd Jordan
44fc4d4010
add --dry-run to darwin-rebuild help 2016-12-22 23:27:29 +01:00
Daiderd Jordan
303d5fa2c4
enable --dry-run for darwin-rebuild 2016-12-22 23:25:32 +01:00
Daiderd Jordan
f317db6bf4
implement darwin-rebuild flags 2016-12-20 00:05:36 +01:00
Daiderd Jordan
68ffdbeb37
add darwin-option example to readme 2016-12-15 22:03:06 +01:00
Daiderd Jordan
942d662d1e
add basic darwin-option command 2016-12-15 21:52:53 +01:00
Daiderd Jordan
0b3c5a21b2
improve system activation for single user installs
Fixes #1
2016-12-14 15:50:00 +01:00
Daiderd Jordan
6af52615ed
add activate-user script 2016-12-14 12:32:20 +01:00
Daiderd Jordan
8708ebb796
move nix-tools out of nix expression 2016-12-12 17:34:43 +01:00
Daiderd Jordan
98f6b407ec
add separate tools to systemPackages 2016-12-12 11:08:23 +01:00
Daiderd Jordan
6ca27b9903
add nix-tools and use <darwin-config> instead of config.nix 2016-12-11 12:49:11 +01:00