• smiletolerantly@awful.systems
    link
    fedilink
    arrow-up
    3
    ·
    12 days ago

    Ehm… I’m also on Nixos and I’d say it’s super trivial.

    services.openssh = {
      enable = true;
      settings = {
        PasswordAuthentication = false;
        PermitRootLogin = "no";
      };
    };
    
    users.users.<name>.openssh.authorizedKeys.keys = [ list of pubkeys ideally read from file in repo ];