From 948798af4ac8c3a32e71136a943de008c610b4a3 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 14:52:14 +0200 Subject: [PATCH] fix(darwin): migrate to new nix-darwin options & root activation :wrench: - set `nix.enable = true`; remove deprecated `services.nix-daemon.enable` :fire: - 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`. --- nixos/hosts/macos.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index 6321b37..e09a985 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -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