diff --git a/lib/macosSystem.nix b/lib/macosSystem.nix index ad83cebe..976e9464 100644 --- a/lib/macosSystem.nix +++ b/lib/macosSystem.nix @@ -17,7 +17,11 @@ in darwin-modules ++ [ ({lib, ...}: { - nixpkgs.pkgs = import nixpkgs-darwin {inherit system;}; + nixpkgs.pkgs = import nixpkgs-darwin { + inherit system; # refer the `system` parameter form outer scope recursively + # To use chrome, we need to allow the installation of non-free software + config.allowUnfree = true; + }; }) ] ++ ( diff --git a/modules/darwin/nix-core.nix b/modules/darwin/nix-core.nix index f2647450..0ff35ac5 100644 --- a/modules/darwin/nix-core.nix +++ b/modules/darwin/nix-core.nix @@ -12,12 +12,6 @@ # ################################################################################### - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - - # Auto upgrade the nix-daemon service. - services.nix-daemon.enable = true; - # Disable auto-optimise-store because of this issue: # https://github.com/NixOS/nix/issues/7273 # "error: cannot link '/nix/store/.tmp-link-xxxxx-xxxxx' to '/nix/store/.links/xxxx': File exists" diff --git a/modules/darwin/system.nix b/modules/darwin/system.nix index c6e071fb..cdb9d9a3 100644 --- a/modules/darwin/system.nix +++ b/modules/darwin/system.nix @@ -17,7 +17,7 @@ ################################################################################### { # Add ability to used TouchID for sudo authentication - security.pam.enableSudoTouchIdAuth = true; + security.pam.services.sudo_local.touchIdAuth = true; time.timeZone = "Asia/Shanghai";