infrastructure/profiles/common/nixos/access.nix
2021-03-24 16:51:48 +00:00

14 lines
361 B
Nix

{ config, lib, pkgs, sources, ... }:
{
security.sudo.wheelNeedsPassword = lib.mkForce false;
users.users.root = {
openssh.authorizedKeys.keys = with pkgs.lib;
concatLists (mapAttrsToList (name: user:
if elem "wheel" user.extraGroups then
user.openssh.authorizedKeys.keys
else
[ ]) config.users.users);
};
}