From 7ed022bc9a3c89834016c866e387b60ba4523eb6 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Tue, 14 Feb 2023 23:04:05 +0300 Subject: 2023-02-14 --- modules/darwin/common/nix.nix | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'modules/darwin/common') diff --git a/modules/darwin/common/nix.nix b/modules/darwin/common/nix.nix index a522cb0..2b39e7d 100644 --- a/modules/darwin/common/nix.nix +++ b/modules/darwin/common/nix.nix @@ -1,15 +1,37 @@ { + config, + inputs, lib, this, ... }: with lib; { + _module.args = let + importNixpkgsx86 = nixpkgs: + import nixpkgs { + inherit (config.nixpkgs) config; + system = "x86_64-darwin"; + }; + in rec { + pkgsx86 = importNixpkgsx86 inputs.nixpkgs; + pkgsLocalx86 = importNixpkgsx86 "${config.my.home}/src/nixpkgs"; # Impure! + pkgsMasterx86 = importNixpkgsx86 inputs.nixpkgs-master; + pkgsStablex86 = importNixpkgsx86 inputs.nixpkgs-stable; + pkgsRevx86 = rev: hash: + importNixpkgsx86 (pkgs.fetchFromGitHub { + owner = "NixOS"; + repo = "nixpkgs"; + inherit rev hash; + }); + pkgsPRx86 = pr: pkgsRevx86 "refs/pull/${toString pr}/head"; + }; + nix = { daemonIOLowPriority = false; daemonProcessType = "Standard"; - extraOptions = optionalString (this.system == "aarch64-darwin") '' - extra-platforms = x86_64-darwin aarch64-darwin + settings.extra-platforms = optionalString (this.system == "aarch64-darwin") '' + x86_64-darwin aarch64-darwin ''; settings.trusted-users = ["@admin"]; -- cgit 1.4.1