diff --git a/cachix/nix-community.nix b/cachix/nix-community.nix new file mode 100644 index 0000000..b0a63e9 --- /dev/null +++ b/cachix/nix-community.nix @@ -0,0 +1,8 @@ +{ + nix = { + binaryCaches = [ "https://nix-community.cachix.org" ]; + binaryCachePublicKeys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; +} diff --git a/configuration.nix b/configuration.nix index 8752507..e8aea42 100644 --- a/configuration.nix +++ b/configuration.nix @@ -103,6 +103,7 @@ ./modules/printing.nix ./modules/periodic.nix ./modules/power.nix + ./modules/cachix.nix ./overlays/emacs-overlay.nix ]; diff --git a/modules/cachix.nix b/modules/cachix.nix new file mode 100644 index 0000000..104ea98 --- /dev/null +++ b/modules/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.binaryCaches = [ "https://cache.nixos.org/" ]; +} diff --git a/modules/software.nix b/modules/software.nix index 4d8a225..d030d3e 100644 --- a/modules/software.nix +++ b/modules/software.nix @@ -37,7 +37,6 @@ podman-compose shellcheck shfmt - android-studio gnumake nodePackages.pyright black @@ -75,6 +74,8 @@ zip unzip unrar + # Overlays + cachix ]; # Fonts declaration