diff options
| author | Mel <mel@rnrd.eu> | 2025-02-14 01:39:50 +0100 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2025-02-14 01:39:50 +0100 |
| commit | 5db8f66792fd9a0d73eda57b188dd0e0074281b9 (patch) | |
| tree | 6964bf34186c0d18f460ee299c555ffcec6378c4 /modules/nix.nix | |
| parent | 0b11b5d57c096699b7b6f0f0527047d0948fc335 (diff) | |
| download | network-5db8f66792fd9a0d73eda57b188dd0e0074281b9.tar.zst network-5db8f66792fd9a0d73eda57b188dd0e0074281b9.zip | |
Add renard as cache for the rest of the network
Signed-off-by: Mel <mel@rnrd.eu>
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) + ]; }; } |
