Commit graph

1483 commits

Author SHA1 Message Date
Michael Hoang
113883e37d
Merge pull request #1388 from ivankovnatsky/master
services/netdata: add cacheDir option
2025-04-09 20:44:32 +02:00
Michael Hoang
73d59580d0
Merge pull request #1400 from dwt/linux-builder-working-directory
Linux builder: working directory rename and cleanup
2025-04-01 17:36:52 +09:00
Michael Hoang
1b8d711826 linux-builder: format 2025-04-01 17:09:49 +09:00
‮rekcäH nitraM‮
b8939c4fe4 linux-builder: remove /nix/store external directory when disabled
When /nix/store internal directories get renamed, they just don't get
into the next version of your system closure and are thus no problem to
rename. But state in the system is a problem, as there is no process to
remov eit. Thus we need to do it ourselves.
2025-04-01 17:09:19 +09:00
‮rekcäH nitraM‮
a175c68f3f linux-builder: upgrade working directory
The working directory was still using an old name of the project, which
made it uneccessary hard to understand why that directory was used
exactly.
2025-04-01 17:07:02 +09:00
Emily
e7bd2f8f2f nix-tools: re‐add nixPackage
(With some tweaks to handle `nix.enable` and order it at a more
sensible position in the `$PATH`.)

The installers actually install Nix into `root`’s profile for some
reason, which means that the path’s prioritization backfires when
the script runs as root and we’re managing the Nix installation. When
running `darwin-rebuild` as a normal user, this wasn’t a problem.

Maybe we should just have a check to make sure there’s no conflicting
Nix in `root`’s profile – it seems pretty bad for `root` to
get the wrong Nix – but it would trigger for almost everyone,
which seems kind of annoying. I guess we could automatically
remove it from `root`’s profile if it matches what’s in
`/nix/var/nix/profiles/default`…

This reverts commit 02232f71c5.
2025-03-31 00:34:55 +09:00
Emily
ce5a3b9db9 treewide: point to the new GitHub organization 2025-03-27 17:07:57 +00:00
‮rekcäH nitraM‮
fe728cfb5a autossh: Fix incorrect reference to systemd
Darwin has LaunchD.
2025-03-23 08:39:49 +01:00
Emily
e9f41de2a8
Merge pull request #1375 from dwt/fix-docs-2
Docs: Fix references to NixOS
2025-03-21 22:10:55 +00:00
Michael Hoang
2d9b633169
Merge pull request #1331 from isabelroses/tools
feat: system tools can be configured individually
2025-03-19 17:35:36 +09:00
Ivan Kovnatsky
5417dfd58c
services/netdata: add cacheDir option
For me netdata could not start:

```logs
time=2025-03-18T21:27:21.023+02:00 comm=netdata source=daemon level=info errno="2, No such file or directory" tid=257369  msg="CONFIG: cannot load cloud config '/var/lib/netdata/cloud.d/cloud.conf'. Running with internal defaults."
time=2025-03-18T21:27:21.024+02:00 comm=netdata source=daemon level=alert errno="2, No such file or directory" tid=257369  msg="Cannot create required directory '/var/cache/netdata'"
0   netdata                             0x0000000104845cb0 netdata_logger_fatal + 356
1   netdata                             0x00000001044d8734 verify_or_create_required_directory + 84
2   netdata                             0x00000001044d718c set_global_environment + 524
3   netdata                             0x00000001044db294 netdata_main + 1920
4   netdata                             0x00000001044dd178 main + 12
5   dyld                                0x0000000184394274 start + 2840
```
2025-03-18 22:13:30 +02:00
Michael Hoang
7b4a4951dc Back out "github-runner: replace mkdir -p -m with umask"
This backs out commit 3b738c765d.

Setting a `umask` made the parent directory have too conservative of
permissions making it so `_github-runner` couldn't access the child
directories.
2025-03-16 19:31:31 +09:00
isabel
9951b44d5b
nix-darwin: system tools can be configured indvidually 2025-03-15 09:24:22 +00:00
Michael Hoang
9175b4bb5f
Merge pull request #1377 from zhaofengli/fix-custom-user-preferences-merging
Fix merging of system.defaults.CustomUserPreferences
2025-03-15 13:46:20 +09:00
Zhaofeng Li
814b503899 Fix merging of system.defaults.CustomUserPreferences 2025-03-14 12:00:17 -06:00
Michael Hoang
4d8a451649
Merge pull request #1355 from toodeluna/fix/profile-name
fix: use correct username for profile
2025-03-14 07:46:59 +09:00
Niklas Ravnsborg
feecfd97cd
update nextdns to use command instead of serviceConfig.ProgramArguments 2025-03-12 15:52:45 +01:00
Varun Narravula
e2361f4496
homebrew: allow setting greedy for all casks by default 2025-03-11 01:23:51 -07:00
Luna Heyman
9ddb2e6ca7 fix: use correct username for profile 2025-03-10 19:55:24 +01:00
‮rekcäH nitraM‮
d97323bc60 Docs: Fix references to NixOS
This option applies to nix-darwin.
2025-03-06 16:24:46 +01:00
Yifei Sun
d06cf700ee
homebrew: remove --no-lock flag
https://github.com/Homebrew/homebrew-bundle/pull/1630
2025-03-04 12:09:11 -05:00
Andrew Marshall
fdc512d107 services/dnscrypt-proxy: Fix use of pkg alias
`dnscrypt-proxy2` is just an alias for `dnscrypt-proxy`. Use that and
avoid eval failures when Nixpkgs is configured with `allowAliases =
false`.
2025-03-03 08:13:33 -05:00
r17x
7386d8878e
services/dnscrypt-proxy: init 2025-02-28 19:58:19 +07:00
Michael Hoang
665cc04a60
Merge pull request #1216 from Coosis/master
Add `pam-watchid` authentication to `sudo` command
2025-02-27 13:09:12 +07:00
Ihar Hrachyshka
b1db30ce36 networking: Restore the original /etc/hosts on activation
A patch that replaced the original file with a symlink to nix store was
reverted because MacOS Network framework doesn't support symlinks for
the file.

The revert leaves the system without any /etc/hosts file at all though.
To fix this, an activation step is added to restore the original file
from .before-nix-darwin backup, if it exists.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-02-26 16:52:13 -05:00
Ihar Hrachyshka
1d9f622484
Revert "Add networking.hosts and .hostFiles from nixos " 2025-02-26 09:24:15 -05:00
Coosis
727119f8c7 pam: add pam_watchid support 2025-02-25 23:51:30 +08:00
Michael Hoang
42be12b510
Merge pull request #1344 from Mic92/fix_pam_module
fix: move `pam` configuration to `sudo_local`
2025-02-25 10:06:11 +07:00
Michael Hoang
11ea44f3e2 pam: add pam_reattach support
Co-Authored-By: Andrew Lubawy <andrew@andrewlubawy.com>
2025-02-25 09:47:28 +07:00
Michael Hoang
47f263077e pam: switch to using sudo_local file
Co-Authored-By: Andrew Lubawy <andrew@andrewlubawy.com>
2025-02-25 09:47:28 +07:00
ibizaman
bde9fa6f64 add networking.hosts and .hostFiles from nixos 2025-02-24 08:57:05 +01:00
Michael Hoang
c9c2d40f71 pam: remove with lib; 2025-02-20 17:46:49 +07:00
Austin Horstman
e21d07988b
dock: refactor persistent-apps option 2025-02-17 13:12:40 -06:00
Austin Horstman
02ba211ea1
dock: allow setting tile-types
You can create spacer tiles in the dock by passing empty tile-data with
specific tile-types
2025-02-16 19:26:43 -06:00
Emily
678b22642a
Merge pull request #1332 from emilazy/push-vyxwvkuuvvvw
treewide: add checks for `nix.enable`
2025-02-14 15:50:17 +00:00
Sander
5926058aec
nix: place extra-prefixed settings after their non-prefixed variants
Fixes #626.

Essentially a copy of NixOS's workaround: https://github.com/NixOS/nixpkgs/pull/278064
2025-02-14 16:33:12 +04:00
Emily
731910af01 {activation-scripts,activate-system}: check gcroots before linking
When `nix.enable` is off, we don’t necessarily have an active
Nix installation, so there won’t necessarily be an active
`/nix/var/nix/gcroots` directory to link things into. NixOS just skips
this unconditionally when `nix.enable` is off, but that doesn’t
work well with a context in which we usually expect `nix.enable`
to be coupled with an unmanaged system installation of Nix.
2025-02-11 20:10:55 +00:00
Emily
cd445c5465 nix: catch reads of unmanaged defaults
When we’re not managing the Nix installation, these defaults
aren’t used out of the box and won’t accurately represent the
state of any unmanaged Nix or the desired Nix package, so reading
the option defaults is a bug.

This was previously a warning for `nix.package` and a silent failure
for all the others. Now that all the problematic accesses in nix-darwin
have been appropriately conditionalized, and since a throw gives a
backtrace where a warning doesn’t, give throwing defaults to all the
`nix.*` options that don’t reflect reality and that that modules
shouldn’t be reading when `nix.enable` is off.

I’m not in love with the implementation strategy here… ideally
we’d think of something better than this and then upstream it to
NixOS. `nix.nrBuildUsers` growing a fake default that is never used
is particularly unfortunate. But this should hopefully catch mistakes
in module code reasonably reliably.
2025-02-11 20:10:55 +00:00
Emily
d677e3e844 nix-tools: only pass config.nix.nixPath through if nix.enable 2025-02-11 20:10:55 +00:00
Emily
42e16f31c6 cachix-agent: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
e3bde1588b github-runner: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
f4e2805e19 ofborg: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
aba0c60eba lorri: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
57c93ffe6c hercules-ci-agent: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
147ed950e3 nixpkgs-flake: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
7cca8f95f7 linux-builder: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
0176a5082b nix-optimise: check for nix.enable
This was added to Nixpkgs in eb8b70c020e6693b29634660fa173d7f14f882eb.
2025-02-11 20:10:55 +00:00
Emily
fc9367a9ec nix-gc: check for nix.enable
This was added to Nixpkgs in eb8b70c020e6693b29634660fa173d7f14f882eb.
2025-02-11 20:10:55 +00:00
Emily
a6746213b1
Merge pull request #1313 from emilazy/push-tzwxwyvonslk
nix: add `nix.enable` option to disable Nix management
2025-02-11 19:30:41 +00:00
Emily
a36049dac5
Merge pull request #1329 from emilazy/push-nlxwnqymuupk
homebrew: use `mas` from Nixpkgs
2025-02-10 23:20:29 +00:00