From a6de268c78a033539ff75a4af262fe7f82706604 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Mon, 20 May 2024 10:50:11 -0500 Subject: [PATCH] Fixes on Darwin Do not use local cache for Darwin systems Update darwin flakes Simplify some extra syntax --- flake.lock | 18 +++++++++--------- modules/baseline.nix | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index e9da980..e7229bc 100644 --- a/flake.lock +++ b/flake.lock @@ -52,11 +52,11 @@ ] }, "locked": { - "lastModified": 1713543876, - "narHash": "sha256-olEWxacm1xZhAtpq+ZkEyQgR4zgfE7ddpNtZNvubi3g=", + "lastModified": 1715653378, + "narHash": "sha256-6kbg/PI3+SBP17f4T0js3CBsMLVtlD0JqJhDKgzk1mQ=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "9e7c20ffd056e406ddd0276ee9d89f09c5e5f4ed", + "rev": "de8b0d60d6fd34f35abffc46adc94ebaa6996ce2", "type": "github" }, "original": { @@ -183,11 +183,11 @@ ] }, "locked": { - "lastModified": 1713818326, - "narHash": "sha256-aw3xbVPJauLk/bbrlakIYxKpeuMWzA2feGrkIpIuXd8=", + "lastModified": 1715486357, + "narHash": "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=", "owner": "nix-community", "repo": "home-manager", - "rev": "67de98ae6eed5ad6f91b1142356d71a87ba97f21", + "rev": "44677a1c96810a8e8c4ffaeaad10c842402647c1", "type": "github" }, "original": { @@ -393,11 +393,11 @@ }, "nixunstable": { "locked": { - "lastModified": 1713714899, - "narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", + "lastModified": 1715534503, + "narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6143fc5eeb9c4f00163267708e26191d1e918932", + "rev": "2057814051972fa1453ddfb0d98badbea9b83c06", "type": "github" }, "original": { diff --git a/modules/baseline.nix b/modules/baseline.nix index af48974..2e36585 100644 --- a/modules/baseline.nix +++ b/modules/baseline.nix @@ -1,4 +1,7 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: +let + notDarwin = (! pkgs.stdenv.isDarwin); +in { # Enable flakes nix = { @@ -15,8 +18,7 @@ keep-derivations = true; min-free = (toString (1024 * 1024 * 1024) ); max-free = (toString (5 * 1024 * 1024 * 1024) ); - substituters = [ - "http://nixcache.home" + substituters = (lib.optional notDarwin [ "http://nixcache.home" ]) ++ [ "https://cache.garnix.io" "https://ai.cachix.org" ]; @@ -32,8 +34,7 @@ }; # Base packages that need to be in all my hosts - environment.systemPackages = with pkgs; ( - [ + environment.systemPackages = with pkgs; [ agenix android-file-transfer bitwarden-cli @@ -56,6 +57,5 @@ transcrypt unzip wget - ] - ); + ]; }