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 1bcca36..0720f46 100644 --- a/configuration.nix +++ b/configuration.nix @@ -104,6 +104,8 @@ ./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 483f092..7d405f9 100644 --- a/modules/software.nix +++ b/modules/software.nix @@ -20,7 +20,7 @@ haskellPackages.pandoc-citeproc # Text editors neovim - emacs + emacsGcc ripgrep fd clang @@ -77,6 +77,8 @@ ## Python nodePackages.pyright black + # Overlays + cachix ]; # Fonts declaration diff --git a/overlays/emacs-overlay.nix b/overlays/emacs-overlay.nix new file mode 100644 index 0000000..cb2a8cf --- /dev/null +++ b/overlays/emacs-overlay.nix @@ -0,0 +1,7 @@ +{ + nixpkgs.overlays = [ + (import (builtins.fetchTarball { + url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; + })) + ]; +}