nix-configs

Personal NixOS and home-manager configuration files
Log | Files | Refs

ssh.nix (211B)


      1 { username, sshkey, ... }:
      2 
      3 {
      4   services.openssh = {
      5     enable = true;
      6     settings.PasswordAuthentication = false;
      7     };
      8 
      9   # SSH key
     10   users.users.${username}.openssh.authorizedKeys.keys = [ "${sshkey}" ];
     11 }