Created
March 8, 2020 04:05
-
-
Save lovesegfault/b58a411dae902f3c08b1de9d7787782f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, pkgs, ... }: with builtins; | |
let | |
userDirs = attrNames (lib.filterAttrs (_: v: v == "directory") (readDir ./.)); | |
mkUser = u: let | |
mod = import (./. + "/${u}") { inherit lib pkgs; }; | |
in { | |
"users.users.${u}" = mod.system; | |
"home-manager.users.${u}" = mod.home; | |
}; | |
users = (lib.genAttrs userDirs mkUser); | |
in users |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment