diff --git a/home/base/nix/default.nix b/home/base/nix/default.nix index c838854c..94b8299a 100644 --- a/home/base/nix/default.nix +++ b/home/base/nix/default.nix @@ -1,4 +1,21 @@ +{ pkgs, ... }: + { + nix = { + package = pkgs.nix; + settings = { + substituters = [ + "https://christianharke.cachix.org/" + "https://nix-community.cachix.org" + "https://cache.nixos.org" + ]; + trusted-public-keys = [ + "christianharke.cachix.org-1:TzmbiNLRcH8G0932XRlQzh8GPvuV9pJcHLqLnzznLKU=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + }; + }; nixpkgs.config = import ./nixpkgs-config.nix; xdg.configFile."nixpkgs/config.nix".source = ./nixpkgs-config.nix; } diff --git a/nixos/base/nix/default.nix b/nixos/base/nix/default.nix index 210bdff2..aa35dd66 100644 --- a/nixos/base/nix/default.nix +++ b/nixos/base/nix/default.nix @@ -6,14 +6,24 @@ ]; nix = { - extraOptions = '' - experimental-features = nix-command flakes - ''; gc = { automatic = true; dates = "04:00"; options = "--delete-older-than 7d"; }; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + substituters = [ + "https://christianharke.cachix.org/" + "https://nix-community.cachix.org" + "https://cache.nixos.org" + ]; + trusted-public-keys = [ + "christianharke.cachix.org-1:TzmbiNLRcH8G0932XRlQzh8GPvuV9pJcHLqLnzznLKU=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + }; }; nixpkgs.config.allowUnfree = true;