From 6cbbb61e2689f6dbe33d1cd9715dac02fc7b2cbb Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 24 Nov 2024 20:41:15 -0800 Subject: [PATCH] feat(home): Add substituters & other nix niceties --- modules/home/base/nix/default.nix | 36 +++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/modules/home/base/nix/default.nix b/modules/home/base/nix/default.nix index f88b905..a9c5786 100644 --- a/modules/home/base/nix/default.nix +++ b/modules/home/base/nix/default.nix @@ -4,16 +4,34 @@ nix = { package = pkgs.lix; - # Enable flakes. - settings.experimental-features = [ - "nix-command" - "flakes" - ]; + settings = { + trusted-users = [ + "root" + config.marleyos.my.name + ]; - # Disable that annoying "git tree is dirty" warning. - extraOptions = '' - warn-dirty = false - ''; + # Enable flakes. + experimental-features = [ + "nix-command" + "flakes" + ]; + + # Set up caches. + extra-substituters = [ + "https://marleyos.cachix.org" + "https://nix-community.cachix.org" + ]; + + trusted-public-keys = [ + "marleyos.cachix.org-1:q2kEtqvS5CoQ8BmKlWOfOnN+fi4gUoSuL6HRKy37eCA=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + + # Disable that annoying "git tree is dirty" warning. + warn-dirty = false; + + auto-optimise-store = true; + }; # Garbage collection. gc.automatic = true;