feat(npins): Update nix-lib

This commit is contained in:
Tom Hubrecht 2023-12-22 23:53:55 +01:00
parent 779f3f3d9e
commit 9236bed612
4 changed files with 16 additions and 11 deletions

View file

@ -2,7 +2,7 @@ let
sources = import ./npins;
metadata = import ./meta;
lib = import (sources.nix-lib + "/trivial.nix");
lib = import (sources.nix-lib + "/src/trivial.nix");
mkNode = node: { name, nodes, ... }: {
# Import the base configuration for each node
@ -34,9 +34,14 @@ let
mkNixpkgs' = node: import (mkNixpkgs node) { };
mkArgs = node: {
nix-lib = import sources.nix-lib { inherit ((mkNixpkgs' node)) lib; keysRoot = ./keys; };
};
mkArgs = node:
let lib' = (mkNixpkgs' node).lib;
in {
lib = import sources.nix-lib {
lib = lib';
keysRoot = ./keys;
};
};
nodes = builtins.attrNames metadata.nodes;
in

View file

@ -1,7 +1,7 @@
{ nix-lib, sources, ... }:
{ lib, sources, ... }:
{
imports = (nix-lib.mkImports ./. [
imports = (lib.extra.mkImports ./. [
"krz-access-control"
"krz-ssh"
]) ++ [

View file

@ -1,4 +1,4 @@
{ config, lib, nix-lib, meta, name, ... }:
{ config, lib, meta, name, ... }:
let
inherit (lib)
@ -39,7 +39,7 @@ in
krz-access-control.users.root = mkDefault admins;
users.users = builtins.mapAttrs
(u: members: { openssh.authorizedKeys.keys = nix-lib.getAllKeys members; })
(u: members: { openssh.authorizedKeys.keys = lib.extra.getAllKeys members; })
cfg.users;
};
}

View file

@ -21,10 +21,10 @@
},
"pre_releases": false,
"version_upper_bound": null,
"version": "0.1.1",
"revision": "5db2443e2cb18335375ad84ffbc066a239c054de",
"version": "0.1.6",
"revision": "ffb3dfa4c146d48300bd4fa625acfe48e091a734",
"url": null,
"hash": "18xzi2yn2vk7zq79pgz8z2s1ijhyjcx5866mp21rrdi9gz37yiif"
"hash": "1frsja071qqx6p7rjnijzhidqfylx0ipzqpmjdvj4jl89h34vrhr"
},
"nixos-23.05": {
"type": "Channel",