feat: pulumi, nix-std, ...

This commit is contained in:
Kat Inskip 2023-01-18 13:35:31 -05:00
parent d5da15e555
commit 6eeb622a8c
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
31 changed files with 244 additions and 106 deletions

View file

@ -1,19 +1,22 @@
{
config,
lib,
std,
inputs,
tree,
...
}: let
inherit (lib.attrsets) mapAttrs mapAttrsToList;
inherit (lib.lists) optional;
inherit (std) set tuple list;
inherit (lib.strings) versionAtLeast;
renameAttrs = names: set.remap ({_0, _1}: tuple.tuple2 (names.${_0} or _0) _1);
renameAttr = oldName: newName: renameAttrs { ${oldName} = newName; };
in {
nix = {
nixPath = mapAttrsToList (name: flake: "${name}=${flake}") inputs;
registry = mapAttrs (_: flake: {inherit flake;}) inputs;
nixPath = set.mapToValues (name: flake: "${name}=${flake.outPath}") (renameAttr "self" "kat" inputs);
registry = set.map (_: flake: {inherit flake;}) inputs;
settings = {
experimental-features = optional (versionAtLeast config.nix.package.version "2.4") "nix-command flakes";
experimental-features = list.optional (versionAtLeast config.nix.package.version "2.4") "nix-command flakes";
substituters = ["https://arc.cachix.org" "https://kittywitch.cachix.org" "https://nix-community.cachix.org"];
trusted-public-keys = ["arc.cachix.org-1:DZmhclLkB6UO0rc0rBzNpwFbbaeLfyn+fYccuAy7YVY=" "kittywitch.cachix.org-1:KIzX/G5cuPw5WgrXad6UnrRZ8UDr7jhXzRTK/lmqyK0=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
auto-optimise-store = true;