1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 00:07:01 +00:00
Commit graph

1363 commits

Author SHA1 Message Date
Emily
bd1d46766a nixpkgs: remove with lib;
Backport of Nixpkgs commit 609e57485d1fa111e3a689498d9d338dc03a7bc5.

Co-authored-by: Felix Buehler <account@buehler.rocks>
2025-02-03 20:44:32 +00:00
Emily
320bf025d2 nixpkgs: link to Nixpkgs manual for global configuration options
Backport of Nixpkgs commit e6057cfd59f278db3aeb058a4e1e0bcc24696267.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Dominic Mills <dominic.millz27@gmail.com>
2025-02-03 20:44:32 +00:00
Emily
6b81859ed0 nixpkgs: fix determination for cross-compiled nix-darwin system
Since the output of `lib.systems.elaborate` contains functions, an
equality check with `==` does not suffice, `lib.systems.equals` should
be used instead.

Backport of Nixpkgs commit 3794246066409d7baac72e3fdfb0e4f66ef4a013.

Co-authored-by: Jared Baur <jaredbaur@fastmail.com>
2025-02-03 20:44:32 +00:00
Emily
2df9e48110 nixpkgs: use less confusing example systems
system and config shouldn't both be specified — each will be filled in
based on the other when the system is elaborated.

Backport of Nixpkgs commit a3ba0495452cd8e72735ebd4472838e96902a259.

Co-authored-by: Alyssa Ross <hi@alyssa.is>
2025-02-03 20:25:16 +00:00
Emily
3cd3a79f9b nixpkgs: Rewrite overlays option docs
henrik-ch was also here :)

Backport of Nixpkgs commit 11406bdc0e5af9b3c8a8d597da23349238c65277.

Co-authored-by: Silvan Mosberger <silvan.mosberger@tweag.io>
Co-Authored-By: Valentin Gagarin <valentin.gagarin@tweag.io>
2025-02-03 20:25:16 +00:00
Emily
962eb3f1c0 nixpkgs: assert that nixpkgs.config is not set when pkgs is passed in externally
This is a common footgun people hit often. Remove it.

Backport of Nixpkgs commit ce87196a00214a0062ece1c3e03a9a97f563580f.

Co-authored-by: K900 <me@0upti.me>
2025-02-03 20:25:16 +00:00
Emily
5b0cffeec2 nixpkgs: fix undefined variable in assertion
This got mangled in the backport a year and a half ago.

Fixes: e25eeff158
2025-02-03 20:25:16 +00:00
tarc
f1cf8c4f5a checks: fix sw_vers parameter for macOSVersion (--productVersion, not -productVersion) 2025-01-30 12:46:25 -03:00
Emily
cc9c8408bb Revert "{activation-scripts,activate-system}: purify environment"
This shouldn’t actually be split out from the Plan because of the
current use of `$HOME` in the defaults for channel‐based setups.

This reverts commit 4bff4bc8ae.
2025-01-28 02:31:59 +00:00
Emily
f43dac477e
Merge pull request #1280 from emilazy/push-tunoqoxyyuvy
{environment,readme}: default configuration path to `/etc/nix-darwin`
2025-01-28 02:14:28 +00:00
Emily
5c12a6f4a1
Merge pull request #1303 from emilazy/push-ulxuwyrnkwpq
{activation-scripts,activate-system}: purify environment
2025-01-27 23:11:51 +00:00
Emily
2733527a58 {environment,readme}: default configuration path to /etc/nix-darwin 2025-01-27 23:10:14 +00:00
Emily
4bff4bc8ae {activation-scripts,activate-system}: purify environment
This ensures that system activation does not depend on various
details of its process environment, ensuring uniformity across various
invocation contexts and with the `activate-system` daemon. This becomes
more important in a post‐user‐activation world to avoid problematic
dependencies like `$SUDO_USER`, but is a good idea in general.

The `sudoers(5)` defaults on my Sequoia system are:

    Defaults	env_reset
    Defaults	env_keep += "BLOCKSIZE"
    Defaults	env_keep += "COLORFGBG COLORTERM"
    Defaults	env_keep += "__CF_USER_TEXT_ENCODING"
    Defaults	env_keep += "CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE"
    Defaults	env_keep += "LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME"
    Defaults	env_keep += "LINES COLUMNS"
    Defaults	env_keep += "LSCOLORS"
    Defaults	env_keep += "SSH_AUTH_SOCK"
    Defaults	env_keep += "TZ"
    Defaults	env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
    Defaults	env_keep += "EDITOR VISUAL"
    Defaults	env_keep += "HOME MAIL"

Of these preserved environment variables, the ones that are set in
practice when I run `sudo env` that aren’t set in the activation
script here are:

* `$COLORTERM`
* `$DISPLAY`
* `$EDITOR`
* `$MAIL`
* `$SSH_AUTH_SOCK`
* `$TERM`
* `$__CF_USER_TEXT_ENCODING`

Most of these seem either pointless or actively harmful to set for
the purpose of the system activation script.

This will mean that tools run during activation won’t print output
in the user’s preferred language, but that’s probably the right
trade‐off overall, as that is likely to break activation scripts
that parse command output anyway.
2025-01-27 22:31:15 +00:00
Emily
ff80eacd0f activation-scripts: remove _status
I believe this has been obsolete since `set -e` was added in
8708ebb796.
2025-01-27 22:31:15 +00:00
Emily
0e87d3d391 activate-system: don’t KeepAlive
It seems like a bad idea to keep restarting the activation daemon
when it fails.
2025-01-27 22:31:15 +00:00
Emily
2119dd10f6 checks: remove darwinChanges
It seems like this has been broken since
26bab2fd32 from 2018; macOS `diff(1)`
does not support these arguments and the `$PATH` has been fixed since
that point. Before that, it would presumably only have worked if you
added GNU diffutils to `environment.systemPackages`.

Proactively notifying users about breaking changes isn’t a bad idea,
but the activation script doesn’t seem like the right place for it,
and as it’s non‐blocking it’s likely that even if it worked it
would get drowned out by the later output anyway. I’d like to move
the changelog into release notes as part of the manual, which would
requires changes to this anyway. Since it’s been broken for almost
seven years anyway, let’s just drop it for now and revisit later.
2025-01-27 20:59:20 +00:00
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
65cc1fa8e3
Merge pull request #1283 from emilazy/push-nynpmzrmmozu
checks: remove `runLink`
2025-01-22 00:01:16 +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
c3954c51c4 checks: remove runLink
Now that we create `/run` as part of activation, this is no longer
useful for anaything.
2025-01-18 23:15:41 +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
e1976612f0 system: tweak ShellCheck settings 2025-01-18 19:34:21 +00:00
Emily
87131f51f8
Merge pull request #1266 from emilazy/push-qwtkyltnunqn
checks: check `/etc/nix/nix.custom.conf` hash
2025-01-18 01:12:15 +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
09414c7e2d
Merge pull request #1272 from emilazy/push-uooytqlwsquo
defaults-write: fix activation script conditionalization
2025-01-17 03:41:37 +00:00
Emily
8abb2e7244 nix: add hashes for Determinate Systems installer v0.33.0 and v0.34.0 2025-01-17 03:34:11 +00:00
Emily
2fe899db70 nix: check /etc/nix/nix.custom.conf hash 2025-01-17 03:34:11 +00:00
Michael Hoang
ca1f666b6d
Merge pull request #1262 from belak-forks/additional-tiling-options
Add support for additional window tiling options
2025-01-17 14:28:18 +11:00
Michael Hoang
c738b81ff5
Merge pull request #1265 from emilazy/push-turlyykvtunt
checks: check for macOS ≥ 11.3
2025-01-17 14:03:04 +11:00
Kaleb Elwert
4075a3c23a Add support for additional window tiling options
This adds support for the following defaults:

- com.apple.WindowManager.EnableTilingByEdgeDrag
- com.apple.WindowManager.EnableTopTilingByEdgeDrag
- com.apple.WindowManager.EnableTilingOptionAccelerator
2025-01-15 22:53:21 -08:00
Emily
f959b8878b defaults-write: fix activation script conditionalization
These are lists, not attribute sets, so the condition was always
succeeding. As far as I can tell this bug has been present since the
function was added.
2025-01-16 00:13:57 +00:00
Emily
ff1d6384df {environment,nix-tools}: correct default $PATH ordering to match macOS 2025-01-15 23:26:14 +00:00
Emily
fe2fc038fd defaults/universalaccess: remove docs for macOS < 11 2025-01-14 15:56:20 +00:00
Emily
1c21c9410e system: remove unnecessary sudo 2025-01-14 15:56:20 +00:00
Emily
b721000dc6 system: add missing newline 2025-01-14 15:56:20 +00:00
Emily
ed6c4aabea system: remove code for macOS < 11 2025-01-14 15:56:20 +00:00
Emily
bd921223ba
Merge pull request #1259 from emilazy/push-xztopxsynztu
Make release branches a thing
2025-01-14 01:47:14 +00:00
Emily
e33d37c41f {readme,examples/flake}: update for release branches 2025-01-14 01:19:21 +00:00
Emily
d5aeb4e5b1 checks: recommend sudo nix-channel 2025-01-14 01:19:21 +00:00
Emily
303a8143a4 checks: check for macOS ≥ 11.3 2025-01-12 19:43:29 +00:00
Emily
8a3ea966bc version: implement nix-darwin release versions 2025-01-11 15:35:09 +00:00
Michael Hoang
be4c1b897a openssh: init module 2025-01-10 10:23:09 +11:00
Michael Hoang
9e856ad0c1 nix: merge nix.settings.trusted-users by default
Backport of https://github.com/NixOS/nixpkgs/pull/318635
2025-01-08 14:27:40 +11:00
Jalal El Mansouri
6ee6262d24 Add --ignore-dependencies option for casks
Some casks have extrenal dependencies managed by brew, neovide for
examples declares neovim as a dependency, a problem arises when you want
to use a nix managed neovim instead
2025-01-05 10:29:12 -03:00
gnammix
89be82cb2b power: quote in string triggered shellcheck SC2016 2025-01-04 14:35:53 +01:00
Michael Hoang
3feaf376d7
Merge pull request #1241 from gnammix/power_conditional_setRestartPowerFailure
power: restartAfterPowerFailure option is carried out conditionally
2025-01-04 13:03:10 +11:00
gnammix
492a72007a
power: echo to print in error messages
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
2024-12-31 14:38:42 +01:00
thuvasooriya
aefd56bb56
aerospace: add workspace-to-monitor-force-assignment option and fix on-window-detected type #1208
trying to fix #1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

aerospace: add workspace-to-monitor-force-assignment option and fix
on-window-detected type #1208

trying to fix #1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

error

formatting mishap

space left

small fix

formatting mishaps
2024-12-29 16:57:26 +05:30
gnammix
62d8f5f289 power: move the check for restartPowerfailure support to checks.nix 2024-12-29 12:13:54 +01:00
Filip Kania
b8e184ebf2
refactor: use enum as option type 2024-12-29 10:58:47 +01:00