25 lines
984 B
Nix
25 lines
984 B
Nix
{ config, lib, pkgs, ... }: {
|
|
|
|
config = lib.mkIf (
|
|
config.sysconfig.users ? nathan && config.sysconfig.users.nathan.usePresets
|
|
) {
|
|
|
|
sops.secrets."nathan/pass".neededForUsers = true;
|
|
|
|
users.users.nathan = {
|
|
shell = lib.mkDefault pkgs.zsh;
|
|
name = lib.mkDefault "nathan";
|
|
isNormalUser = lib.mkDefault true;
|
|
#hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile;
|
|
extraGroups = [ "networkmanager" "docker" ];
|
|
openssh.authorizedKeys.keys = with config.sysconfig.users.nathan; lib.mkIf config.sysconfig.services.openssh.enable (
|
|
ssh.keys ++ (map (z: config.sysconfig.sshHostKeys.${z}) ssh.hosts)
|
|
);
|
|
packages = lib.mkIf (
|
|
config.sysconfig.users.nathan.home-manager.enable && config.sysconfig.users.nathan.home-manager.standalone
|
|
) [ pkgs.home-manager ];
|
|
|
|
};
|
|
};
|
|
}
|