27 lines
887 B
Nix
27 lines
887 B
Nix
systemProfile: { pkgs, lib, config, inputs, ... }:
|
|
let meta = import ./userinfo.nix pkgs;
|
|
in ({
|
|
age.secrets.shadow-max.file = ../../secrets/shadow-max.age;
|
|
users.extraGroups.${meta.userName}.gid = 1000;
|
|
users.users.${meta.userName} = {
|
|
hashedPasswordFile = config.age.secrets.shadow-max.path;
|
|
description = meta.gecos;
|
|
isNormalUser = true;
|
|
group = meta.userName;
|
|
extraGroups = [ "wheel" "networkmanager" "adbusers" "audio" ];
|
|
uid = 1000;
|
|
shell = with pkgs;
|
|
if config.programs.zsh.enable
|
|
then zsh
|
|
else bash;
|
|
openssh.authorizedKeys.keys = meta.sshKeys;
|
|
};
|
|
} // lib.optionalAttrs (systemProfile == "desktop") {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.${meta.userName} = import ./home.nix {
|
|
inherit pkgs lib config inputs meta systemProfile;
|
|
isNixos = true;
|
|
};
|
|
})
|