os/profiles/base-user/default.nix
Benjamin Bädorf c977bfba38
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
Merge branch 'main' into momo/main
2023-07-13 18:18:59 +02:00

45 lines
1 KiB
Nix

{
config,
pkgs,
lib,
...
}: let
psCfg = config.pub-solar;
in {
imports = [
./home.nix
];
users = {
mutableUsers = false;
groups."${psCfg.user.name}" = {};
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;
group = "${psCfg.user.name}";
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 [];
};
};
}