diff options
Diffstat (limited to 'modules/nix.nix')
| -rw-r--r-- | modules/nix.nix | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/modules/nix.nix b/modules/nix.nix index 2e067aa..032a092 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -1,5 +1,13 @@ -{ self, ... }: +{ self, me, lib, ... }: +let + inherit (lib) mkIf mkMerge; + + renardCache = { + substituters = [ "https://cache.rnrd.eu" ]; + trusted-public-keys = [ "cache.rnrd.eu-1:6Q2MPTZ6ycAzWcc0VzXR+pKRlJ+6kfdQfj6iRsN5s1I=" ]; + }; +in { nix = { optimise = { @@ -20,9 +28,12 @@ "nixos-config=${self}/compat/nixos" ]; - settings = { - experimental-features = [ "flakes" "nix-command" ]; - trusted-users = [ "root" "mel" ]; - }; + settings = mkMerge [ + { + experimental-features = [ "flakes" "nix-command" ]; + trusted-users = [ "root" "mel" ]; + } + (mkIf (!me.is.renard) renardCache) + ]; }; } |
