feat: init openssh module

This commit is contained in:
notohh 2023-04-26 19:23:23 -04:00
parent 4d0ce516a8
commit 8fc554c879
Signed by: notohh
GPG key ID: BD47506D475EE86D
6 changed files with 21 additions and 8 deletions

View file

@ -6,8 +6,7 @@ inputs: {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.hime;
};
sshOpts = ["-i" "/etc/ssh/ssh_host_ed25519_key"];
sshUser = "root";
};
};
}
}

View file

@ -22,10 +22,6 @@
xkbVariant = "";
};
services.openssh = {
enable = true;
};
virtualisation.docker.enable = true;
users = {
defaultUserShell = pkgs.nushell;

View file

@ -48,5 +48,4 @@
pinentryFlavor = "curses";
};
services.openssh.enable = true;
}

View file

@ -4,5 +4,6 @@
./networking.nix
./nix.nix
./system.nix
./openssh.nix
];
}

View file

@ -29,7 +29,7 @@
"https://hyprland.cachix.org"
"https://cache.nixos.org"
];
trusted-users = [ "root" "@wheel" ];
trusted-users = ["root" "@wheel"];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="

18
modules/openssh.nix Normal file
View file

@ -0,0 +1,18 @@
{...}: {
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "yes";
StreamLocalBindUnlink = "yes";
GatewayPorts = "clientspecified";
};
hostKeys = [
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];
};
}