From 0fc4814d3e143504847a6eb729aedc656774af3f Mon Sep 17 00:00:00 2001 From: mat ess Date: Wed, 31 Aug 2022 00:48:25 -0400 Subject: [PATCH] Add darwin shim, fix setting names --- darwin.nix | 7 +++++++ darwin/bootstrap.nix | 6 +++--- flake.nix | 13 ++++++++----- 3 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 darwin.nix diff --git a/darwin.nix b/darwin.nix new file mode 100644 index 0000000..8b24fcb --- /dev/null +++ b/darwin.nix @@ -0,0 +1,7 @@ +{ system ? builtins.currentSystem +, nixpkgs ? ./nixpkgs.nix +, pkgs ? import nixpkgs { inherit system; } +, lib ? pkgs.lib +, ... +}@args: +import (import ./default.nix).inputs.darwin args diff --git a/darwin/bootstrap.nix b/darwin/bootstrap.nix index bb6f29e..4bc4f17 100644 --- a/darwin/bootstrap.nix +++ b/darwin/bootstrap.nix @@ -2,20 +2,20 @@ { # Nix configuration ------------------------------------------------------------------------------ - nix.settings.binaryCaches = [ + nix.settings.trusted-substituters = [ "https://cache.nixos.org/" "https://hydra.iohk.io" "https://cache.iog.io" "https://nix-community.cachix.org" "https://mat.cachix.org" ]; - nix.settings.binaryCachePublicKeys = [ + nix.settings.trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "mat.cachix.org-1:AHqv9SoBEPKlJX2DDZQnjaMcvBAgpH1j8rw5USYDZno=" ]; - nix.settings.trustedUsers = [ + nix.settings.trusted-users = [ "@admin" ]; nix.configureBuildUsers = true; diff --git a/flake.nix b/flake.nix index c6fd99a..5221622 100644 --- a/flake.nix +++ b/flake.nix @@ -102,7 +102,10 @@ { nixpkgs = nixpkgsConfig; # Hack to support legacy worklows that use `` etc. - nix.nixPath = { nixpkgs = "$HOME/dotfiles.nix/nixpkgs.nix"; }; + nix.nixPath = { + nixpkgs = "$HOME/dotfiles.nix/nixpkgs.nix"; + darwin = "$HOME/dotfiles.nix/darwin.nix"; + }; # `home-manager` config users.users.${primaryUser}.home = "/Users/${primaryUser}"; home-manager.useGlobalPkgs = true; @@ -134,8 +137,8 @@ networking.knownNetworkServices = [ "Wi-Fi" ]; - nix.settings.buildCores = 2; - nix.settings.maxJobs = 4; + nix.settings.cores = 2; + nix.settings.max-jobs = 4; environment.systemPackages = with pkgs; [ vscodium @@ -163,8 +166,8 @@ networking.knownNetworkServices = [ "Wi-Fi" ]; - nix.settings.buildCores = 2; - nix.settings.maxJobs = 5; + nix.buildCores = 2; + nix.maxJobs = 5; games.enable = false; environment.systemPackages = with pkgs; [