modified: home/git.nix modified: hosts/README.md modified: hosts/virtualbox/README.md modified: hosts/virtualbox/configuration.nix modified: modules/core/users.nix modified: modules/desktop/pkg.nix modified: modules/server/README.md modified: profiles/README.md
21 lines
706 B
Nix
21 lines
706 B
Nix
{ lib, pkgs, username, config, ... }:
|
|
{
|
|
programs.zsh.enable = true;
|
|
users.defaultUserShell = pkgs.zsh;
|
|
|
|
users.users.${username} = {
|
|
isNormalUser = true;
|
|
extraGroups = [ "wheel" ];
|
|
shell = pkgs.zsh;
|
|
}
|
|
// lib.optionalAttrs (!(config.sops.secrets ? "users/luochen570/passwordHash")) {
|
|
initialPassword = "Dly928730@..";
|
|
}
|
|
// lib.optionalAttrs (config.sops.secrets ? "users/luochen570/authorized_key") {
|
|
openssh.authorizedKeys.keyFiles = [ config.sops.secrets."users/luochen570/authorized_key".path ];
|
|
}
|
|
// lib.optionalAttrs (config.sops.secrets ? "users/luochen570/passwordHash") {
|
|
hashedPasswordFile = config.sops.secrets."users/luochen570/passwordHash".path;
|
|
};
|
|
}
|