2021-05-30 19:10:28 +00:00
|
|
|
{
|
2022-11-20 22:28:23 +00:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2021-05-30 19:10:28 +00:00
|
|
|
psCfg = config.pub-solar;
|
2022-11-20 22:28:23 +00:00
|
|
|
in {
|
2021-05-30 19:10:28 +00:00
|
|
|
imports = [
|
|
|
|
./home.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
users = {
|
|
|
|
mutableUsers = false;
|
|
|
|
|
2023-03-06 23:48:42 +00:00
|
|
|
groups."${psCfg.user.name}" = {};
|
|
|
|
|
2021-05-30 19:10:28 +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;
|
2023-03-06 23:48:42 +00:00
|
|
|
group = "${psCfg.user.name}";
|
2021-11-17 11:05:50 +00:00
|
|
|
description = psCfg.user.description;
|
2022-08-10 20:42:14 +00:00
|
|
|
extraGroups = [
|
|
|
|
"input"
|
|
|
|
"lp"
|
2023-07-02 14:18:40 +00:00
|
|
|
"networkmanager"
|
2022-08-10 20:42:14 +00:00
|
|
|
"scanner"
|
2023-07-02 14:18:40 +00:00
|
|
|
"video"
|
|
|
|
"wheel"
|
2022-08-10 20:42:14 +00:00
|
|
|
];
|
2021-05-30 19:10:28 +00:00
|
|
|
initialHashedPassword =
|
|
|
|
if psCfg.user.password != null
|
|
|
|
then psCfg.user.password
|
|
|
|
else "";
|
2022-10-05 09:57:51 +00:00
|
|
|
openssh.authorizedKeys.keys =
|
|
|
|
if psCfg.user.publicKeys != null
|
|
|
|
then psCfg.user.publicKeys
|
|
|
|
else [];
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|