Adding ssh
This commit is contained in:
@@ -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 = {
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.ssh.startAgent = true;
|
||||||
|
}
|
||||||
@@ -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);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
{ inputs, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.openssh ];
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user