add ssh config and authorized keys

This commit is contained in:
Ilan Joselevich 2023-05-15 23:44:20 +03:00
parent 68840dc3bb
commit 7ddc09d5da
No known key found for this signature in database
3 changed files with 16 additions and 2 deletions

View File

@ -19,8 +19,6 @@
system.stateVersion = "23.05"; system.stateVersion = "23.05";
services.openssh.enable = true;
programs.vim.defaultEditor = true; programs.vim.defaultEditor = true;
users = { users = {
@ -28,6 +26,11 @@
users."tami" = { users."tami" = {
isNormalUser = true; isNormalUser = true;
hashedPassword = "$y$j9T$BUWA7o2/xFFY6g/B9somr1$rveo/ttShW7jd835kf2pE9vAfDIXj/Hii3B5c9GyCjA"; hashedPassword = "$y$j9T$BUWA7o2/xFFY6g/B9somr1$rveo/ttShW7jd835kf2pE9vAfDIXj/Hii3B5c9GyCjA";
openssh.authorizedKeys.keys = [
# Kranzes/Ilan
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIBF2qWuvMCuJMlc6+ehyU0V/asmfAlT5/GLhUQqbpQ/bAAAABHNzaDo="
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIEVpaQ0K0Fzz0Hu48pqKiI25lr9ASwXR1yzYbeErBX/2AAAABHNzaDo="
];
extraGroups = [ "wheel" "networkmanager" ]; extraGroups = [ "wheel" "networkmanager" ];
uid = 1000; uid = 1000;
packages = with pkgs; [ packages = with pkgs; [

View File

@ -7,6 +7,7 @@ inputs.nixpkgs.lib.nixosSystem {
./configuration.nix ./configuration.nix
./hardware-configuration.nix ./hardware-configuration.nix
"${inputs.self}/profiles/nix-nixpkgs.nix" "${inputs.self}/profiles/nix-nixpkgs.nix"
"${inputs.self}/profiles/ssh.nix"
{ {
_module.args.nixinate = { _module.args.nixinate = {
host = "tami-mac"; host = "tami-mac";

10
profiles/ssh.nix Normal file
View File

@ -0,0 +1,10 @@
{
services.openssh = {
enable = true;
settings = {
passwordAuthentication = false;
kbdInteractiveAuthentication = false;
permitRootLogin = "no";
};
};
}