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

1300 commits

Author SHA1 Message Date
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
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
Filip Kania
25fb527105
feat: add screencapture.target option 2024-12-29 00:17:19 +01:00
Michael Hoang
53a0c2fe6e
Merge pull request #1233 from adamcstephens/fish/package
fish: add package option
2024-12-29 10:04:09 +11:00
Xingquan Liu
daf9d9fe5d
fix(zsh): correct the path of zsh-fast-syntax-highlighting 2024-12-29 01:31:31 +08:00
Adam C. Stephens
2165857a24
fish: add package option 2024-12-27 23:47:55 -05:00
gnammix
016b1608ee power: restartAfterPowerFailure option is carried out in activation script only if supported
Minor documentation change
2024-12-27 21:36:31 +01:00
Jörg Thalheim
2c86af2e99 programs.ssh: add extraConfig option
Same interface as in NixOS. This is useful to apply configuration for remote builders.
2024-12-23 21:32:37 +01:00
Domen Kožar
a35b08d09e
Merge pull request #1202 from Enzime/push-voxzmynopkkp
linux-builder: default `maxJobs` to amount of cores for Linux builder
2024-12-07 11:27:23 +00:00
Michael Hoang
8752b6ae3c github-runner: add instructions for triggering a runner registration 2024-12-07 13:08:55 +11:00
Michael Hoang
22cde06f49 github-runner: fix service not starting 2024-12-07 13:06:22 +11:00
Michael Hoang
06e1d77068 github-runner: use lib.getExe{,'} 2024-12-07 13:01:21 +11:00
Michael Hoang
d8255f09da github-runner: remove with lib; 2024-12-07 12:54:17 +11:00
z0al
9a59556018
fix(aerospace): allow startup commands 2024-12-04 19:03:03 +00:00
Alex James
0f9576cedc
nix: fix Lix version detection in auto-optimise-store assertion 2024-12-04 02:06:23 -06:00