extendedLib: attrsets.concatAttrs -> lib.mergeAttrsList
This commit is contained in:
parent
0ea394dbf9
commit
7500197568
@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, extendedLib, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
adminUser = "root";
|
||||
normalUser = "oysteikt";
|
||||
@ -88,16 +88,17 @@ let
|
||||
machines: pipe machines pipeline;
|
||||
in
|
||||
{
|
||||
programs.ssh.matchBlocks = (extendedLib.attrsets.concatAttrs [
|
||||
programs.ssh.matchBlocks = lib.mergeAttrsList [
|
||||
(convertMachinesWith convertNormalMachine normalMachines)
|
||||
(convertMachinesWith convertAdminMachine rootMachines)
|
||||
]) // {
|
||||
"pvv-git git.pvv.ntnu.no" = {
|
||||
hostname = "git.pvv.ntnu.no";
|
||||
user = "gitea";
|
||||
addressFamily = "inet";
|
||||
port = 2222;
|
||||
proxyJump = "pvv";
|
||||
};
|
||||
};
|
||||
{
|
||||
"pvv-git git.pvv.ntnu.no" = {
|
||||
hostname = "git.pvv.ntnu.no";
|
||||
user = "gitea";
|
||||
addressFamily = "inet";
|
||||
port = 2222;
|
||||
proxyJump = "pvv";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -7,9 +7,6 @@ in rec {
|
||||
mapToAttrsWithConst = constant: items:
|
||||
listToAttrs (map (name: nameValuePair name constant) items);
|
||||
|
||||
# [AttrSet] -> AttrSet
|
||||
concatAttrs = foldr (a: b: a // b) {};
|
||||
|
||||
# (Int -> String -> a -> a) -> AttrSet -> AttrSet
|
||||
imap0Attrs = f: set:
|
||||
listToAttrs (imap0 (i: attr: nameValuePair attr (f i attr set.${attr})) (attrNames set));
|
||||
|
Loading…
Reference in New Issue
Block a user