feat(nix): add forAllUsers' and docstrings to lib
Adds forAllUsers' function and docstrings to nix lib.
This commit is contained in:
parent
de72f9a869
commit
28076ee149
2 changed files with 88 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.flake;
|
||||
inherit (config.flake.lib) forAllUsers flattenAttrs;
|
||||
inherit (config.flake.lib) forAllUsers' flattenAttrs;
|
||||
inherit (lib.attrsets) filterAttrs;
|
||||
owner = flattenAttrs (filterAttrs (_: v: (v.primary or false)) cfg.manifest.users);
|
||||
in
|
||||
|
@ -27,7 +27,7 @@ in
|
|||
openssh.authorizedKeys.keys = [ owner.pubkey ];
|
||||
};
|
||||
};
|
||||
home-manager.users = forAllUsers (
|
||||
home-manager.users = forAllUsers' (
|
||||
name: _: {
|
||||
#TODO: move into nixos/darwin config - should not apply to homeConfigurations
|
||||
home.username = name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue