diff --git a/darwin-common.nix b/darwin-common.nix index 7547af6f..d9c286cf 100644 --- a/darwin-common.nix +++ b/darwin-common.nix @@ -4,12 +4,12 @@ environment.pathsToLink = [ "/share/zsh" ]; services.nix-daemon.enable = true; nix.package = pkgs.nixFlakes; - nix.buildCores = 0; # use all cores - nix.maxJobs = 10; # use all cores + nix.settings.cores = 0; # use all cores + nix.settings.max-jobs = 10; # use all cores nix.distributedBuilds = true; nix.buildMachines = [{ systems = [ "x86_64-linux" ]; - supportedFeatures = [ "kvm" "big-parallel" ]; + supportedFeatures = [ "kvm" "big-parallel" ]; sshUser = "ragon"; maxJobs = 12; hostName = "ds9"; diff --git a/flake.nix b/flake.nix index ab688be4..79ef42eb 100644 --- a/flake.nix +++ b/flake.nix @@ -79,6 +79,10 @@ self.overlays.default emacs-overlay.overlay ]; + genPkgsWithOverlays = system: import nixpkgs { + inherit system overlays; + config.allowUnfree = true; + }; hmConfig = { hm, pkgs, inputs, config, ... }: { @@ -122,19 +126,16 @@ }; darwinSystem = system: extraModules: hostName: let - pkgs = genPkgs system; + pkgs = genPkgsWithOverlays system; in darwin.lib.darwinSystem { inherit system; - specialArgs = { inherit lib; }; + specialArgs = { inherit lib pkgs inputs self darwin; }; modules = [ home-manager.darwinModules.home-manager { #system.darwinLabel = "${config.system.darwinLabel}@${rev}"; - _module.args = { inherit lib inputs self darwin; }; - nixpkgs.pkgs = pkgs; - nixpkgs.overlays = overlays; networking.hostName = hostName; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true;