Adding ssh

This commit is contained in:
Miguel Palhas
2024-10-06 11:52:19 +01:00
parent 66c1527a6b
commit 8001c55931
4 changed files with 22 additions and 2 deletions
+1
View File
@@ -18,6 +18,7 @@
../common/programs/eww ../common/programs/eww
../common/programs/kitty.nix ../common/programs/kitty.nix
../common/features/colorscheme.nix ../common/features/colorscheme.nix
../common/features/ssh-agent.nix
]; ];
home.sessionVariables = { home.sessionVariables = {
+4
View File
@@ -0,0 +1,4 @@
{ ... }:
{
programs.ssh.startAgent = true;
}
+8
View File
@@ -45,5 +45,13 @@ in
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
initialHashedPassword = "$y$j9T$uRTzF/sBdrqVGZTRhPuR00$wgLgEGlq.lEmlCPiy69jkbtfC9HKpyaVPDHDdBGtE5D"; initialHashedPassword = "$y$j9T$uRTzF/sBdrqVGZTRhPuR00$wgLgEGlq.lEmlCPiy69jkbtfC9HKpyaVPDHDdBGtE5D";
openssh.authorizedKeys.keys =
let
authorizedKeys = pkgs.fetchurl {
url = "https://github.com/naps62.keys";
sha256 = "sha256-dP8LjaburPwfIr2jhly9rMwOLJyUkQP7Em5IKH/qXbY=";
};
in
pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys);
}; };
} }
+9 -2
View File
@@ -1,4 +1,11 @@
{ inputs, pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = [ pkgs.openssh ]; services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
};
} }