2021-05-30 19:10:28 +00:00
|
|
|
{
|
2023-01-28 20:49:10 +00:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
psCfg = config.pub-solar;
|
|
|
|
in {
|
2021-05-30 19:10:28 +00:00
|
|
|
imports = [
|
|
|
|
./home.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
users = {
|
|
|
|
mutableUsers = false;
|
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
users = with pkgs;
|
|
|
|
pkgs.lib.setAttrByPath [psCfg.user.name] {
|
|
|
|
# Indicates whether this is an account for a “real” user.
|
|
|
|
# This automatically sets group to users, createHome to true,
|
|
|
|
# home to /home/username, useDefaultShell to true, and isSystemUser to false.
|
|
|
|
isNormalUser = true;
|
|
|
|
description = psCfg.user.description;
|
|
|
|
extraGroups = [
|
|
|
|
"input"
|
|
|
|
"lp"
|
|
|
|
"networkmanager"
|
|
|
|
"scanner"
|
|
|
|
"video"
|
|
|
|
"wheel"
|
|
|
|
];
|
|
|
|
initialHashedPassword =
|
|
|
|
if psCfg.user.password != null
|
|
|
|
then psCfg.user.password
|
|
|
|
else "";
|
|
|
|
openssh.authorizedKeys.keys =
|
|
|
|
if psCfg.user.publicKeys != null
|
|
|
|
then psCfg.user.publicKeys
|
|
|
|
else [];
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
}
|