mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: pulumi, nix-std, ...
This commit is contained in:
parent
d5da15e555
commit
6eeb622a8c
31 changed files with 244 additions and 106 deletions
|
|
@ -3,10 +3,10 @@
|
|||
tree,
|
||||
machine,
|
||||
systemType,
|
||||
lib,
|
||||
std,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.lists) optional;
|
||||
inherit (std) list;
|
||||
in {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
|
|
@ -15,13 +15,13 @@ in {
|
|||
[
|
||||
modules.home
|
||||
]
|
||||
++ optional (tree.${systemType} ? home) tree.${systemType}.home;
|
||||
++ list.optional (tree.${systemType} ? home) tree.${systemType}.home;
|
||||
|
||||
users.kat.imports = with tree.kat; [
|
||||
common
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit tree machine;
|
||||
inherit tree machine std;
|
||||
parent = config;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue