blob: 91892408317f43d86ed120d2437f78971246a35b [file] [log] [blame]
# Home manager is used separately from this deploy, but we still need to create
# user accounts in the system config
{ base, pkgs, lib, config, ... }:
let
mkUser = username: {
isSystemUser = true;
linger = true;
createHome = true;
home = "/services/${username}";
group = "clicks";
shell = pkgs.bashInteractive;
} // (
if builtins.pathExists "${../services}/${username}/system.nix"
then import "${../services}/${username}/system.nix"
else { }
);
in
{
users.users = lib.pipe ../services [
builtins.readDir
(lib.filterAttrs (_name: value: value == "directory"))
builtins.attrNames
(map (name: { inherit name; value = mkUser name; }))
builtins.listToAttrs
];
} // (
if (base != null)
then {
/* users.groups = lib.mapAttrs'
(_: user: {
name = user.group;
value = { };
})
base.config.users.users;*/
} else { }
)