blob: 0e1dbd66d0e5cdd6ce0b96c6416d671f1b9b7d05 [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 { }
)