From b6a8c130fece820a3a92bada43c9af26f90c93d5 Mon Sep 17 00:00:00 2001 From: Nicole Date: Tue, 4 Nov 2025 21:30:41 +0100 Subject: [PATCH] Added cachix. I'm tired of compiling CUDA --- etc/nixos/cachix.nix | 13 +++++++++++++ etc/nixos/cachix/niri.nix | 13 +++++++++++++ etc/nixos/cachix/nix-community.nix | 13 +++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 etc/nixos/cachix.nix create mode 100644 etc/nixos/cachix/niri.nix create mode 100644 etc/nixos/cachix/nix-community.nix diff --git a/etc/nixos/cachix.nix b/etc/nixos/cachix.nix new file mode 100644 index 0000000..ecd2d39 --- /dev/null +++ b/etc/nixos/cachix.nix @@ -0,0 +1,13 @@ + +# WARN: this file will get overwritten by $ cachix use +{ pkgs, lib, ... }: + +let + folder = ./cachix; + toImport = name: value: folder + ("/" + name); + filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key; + imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder)); +in { + inherit imports; + nix.settings.substituters = ["https://cache.nixos.org/"]; +} diff --git a/etc/nixos/cachix/niri.nix b/etc/nixos/cachix/niri.nix new file mode 100644 index 0000000..08bca63 --- /dev/null +++ b/etc/nixos/cachix/niri.nix @@ -0,0 +1,13 @@ + +{ + nix = { + settings = { + substituters = [ + "https://niri.cachix.org" + ]; + trusted-public-keys = [ + "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" + ]; + }; + }; +} diff --git a/etc/nixos/cachix/nix-community.nix b/etc/nixos/cachix/nix-community.nix new file mode 100644 index 0000000..7fc4c65 --- /dev/null +++ b/etc/nixos/cachix/nix-community.nix @@ -0,0 +1,13 @@ + +{ + nix = { + settings = { + substituters = [ + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; + }; +}