diff --git a/flake.nix b/flake.nix index fd08309..a6bb9b6 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,18 @@ ./firestar ./fonts.nix ./packages.nix - (import ./user.nix { name = "Aode"; }) + (import ./user.nix { + name = "Aode"; + authorizedKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILojJubDCB2Mc4fw2mdp5Lzg5mTifXwawIVuyb3vr4lB asonix@graystripe" + ]; + }) + { + services.openssh = { + enable = true; + settings.PermitRootLogin = "no"; + }; + } ]; }; nixosConfigurations.graystripe = nixpkgs.lib.nixosSystem { diff --git a/user.nix b/user.nix index d1ceb24..a0b868b 100644 --- a/user.nix +++ b/user.nix @@ -1,10 +1,11 @@ -{ name }: +{ name, authorizedKeys ? [] }: { pkgs, ... }: { # Define a user account. Don't forget to set a password with `passwd`. users.users.asonix = { + openssh.authorizedKeys.keys = authorizedKeys; isNormalUser = true; description = name; shell = pkgs.zsh;