fix(darwin): migrate to new nix-darwin options & root activation 🔧

- set `nix.enable = true`; remove deprecated `services.nix-daemon.enable` 🔥
- replace unsafe `nix.settings.auto-optimise-store` with `nix.optimise.automatic`
- rename Touch ID option to `security.pam.services.sudo_local.touchIdAuth`
- add `system.primaryUser = "danny"` so user-scoped macOS defaults apply under root activation
- keep GC schedule; retain `nixpkgs.hostPlatform = "aarch64-darwin"`
- (minor) expand `environment.systemPackages` with `git`, `gnupg`, `coreutils`

This adapts the config to recent nix-darwin changes and fixes evaluation failures during `darwin-rebuild`.
This commit is contained in:
Daniel Thoren 2025-09-08 14:52:14 +02:00 committed by GitHub
parent 3a6fbd2f89
commit 948798af4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,20 +3,22 @@
{
# Apple Silicon + nix-darwin basics
nixpkgs.hostPlatform = "aarch64-darwin";
services.nix-daemon.enable = true;
nix.enable = true;
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
gc = {
automatic = true;
interval = { Weekday = 0; Hour = 3; Minute = 0; };
};
optimise.automatic = true; # replaces auto-optimise-store
};
nixpkgs.config.allowUnfree = true;
system.primaryUser = "danny";
# Shells & dev ergonomics
programs.fish.enable = true;
@ -35,7 +37,7 @@
};
# macOS niceties
security.pam.enableSudoTouchIdAuth = true;
security.pam.services.sudo_local.touchIdAuth = true;
system.defaults = {
# Keyboard