diff --git a/system/hosts/vega/cachix.nix b/system/hosts/vega/cachix.nix new file mode 100644 index 0000000..7534ef2 --- /dev/null +++ b/system/hosts/vega/cachix.nix @@ -0,0 +1,13 @@ +# WARN: `cachix use` will write to /etc/nixos/. You will need to update this file manually. +{ 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/system/hosts/vega/cachix/haskell-miso-cachix.nix b/system/hosts/vega/cachix/haskell-miso-cachix.nix new file mode 100644 index 0000000..36b1bde --- /dev/null +++ b/system/hosts/vega/cachix/haskell-miso-cachix.nix @@ -0,0 +1,13 @@ + +{ + nix = { + settings = { + substituters = [ + "https://haskell-miso-cachix.cachix.org" + ]; + trusted-public-keys = [ + "haskell-miso-cachix.cachix.org-1:m8hN1cvFMJtYib4tj+06xkKt5ABMSGfe8W7s40x1kQ0=" + ]; + }; + }; +} diff --git a/system/hosts/vega/configuration.nix b/system/hosts/vega/configuration.nix index ab815b4..db6649e 100644 --- a/system/hosts/vega/configuration.nix +++ b/system/hosts/vega/configuration.nix @@ -64,6 +64,7 @@ # $ nix search wget environment.systemPackages = with pkgs; [ vim + cachix ]; # Some programs need SUID wrappers, can be configured further or are diff --git a/system/hosts/vega/default.nix b/system/hosts/vega/default.nix index c1b97a5..721212d 100644 --- a/system/hosts/vega/default.nix +++ b/system/hosts/vega/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./cachix.nix ./configuration.nix ./hardware-configuration.nix ../../authorized-keys.nix