2023-06-24 21:24:20 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
homeRoot =
|
|
|
|
if pkgs.stdenv.isDarwin
|
|
|
|
then "/Users"
|
|
|
|
else if pkgs.stdenv.isLinux
|
|
|
|
then "/home"
|
|
|
|
else throw "Unsupported OS";
|
|
|
|
in {
|
2023-12-07 15:40:49 +01:00
|
|
|
users.users."${config.dotfiles.username}" =
|
2023-06-24 21:24:20 +02:00
|
|
|
{
|
2023-12-07 15:40:49 +01:00
|
|
|
home = "${homeRoot}/${config.dotfiles.username}";
|
2023-06-24 21:24:20 +02:00
|
|
|
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh"];
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
}
|
|
|
|
// (
|
|
|
|
if pkgs.stdenv.isLinux
|
|
|
|
then {
|
|
|
|
isNormalUser = lib.mkIf pkgs.stdenv.isLinux true;
|
|
|
|
extraGroups = ["wheel"];
|
|
|
|
}
|
|
|
|
else {}
|
|
|
|
);
|
|
|
|
}
|