flip host and user

This commit is contained in:
2026-06-06 01:14:08 +04:00
parent 5af0faa0ee
commit 650c6724f0
+2 -2
View File
@@ -68,7 +68,7 @@ in
) )
); );
# Every user on every host is a home identity "<hostName>@<userName>". # Every user on every host is a home identity "<userName>@<hostName>".
home_keys = lib.mergeAttrsList ( home_keys = lib.mergeAttrsList (
lib.flatten ( lib.flatten (
map ( map (
@@ -76,7 +76,7 @@ in
lib.mapAttrsToList ( lib.mapAttrsToList (
_: host: _: host:
lib.mapAttrsToList ( lib.mapAttrsToList (
_: user: { "${host.hostName}@${user.userName}" = toKeyList (user.sopsPublic or [ ]); } _: user: { "${user.userName}@${host.hostName}" = toKeyList (user.sopsPublic or [ ]); }
) (host.users or { }) ) (host.users or { })
) perSystem ) perSystem
) (builtins.attrValues den.hosts) ) (builtins.attrValues den.hosts)