mirror of
https://git.lgmrszd.xyz/Lgmrszd/nix-cfg.git
synced 2025-12-14 15:48:21 +01:00
vps1: move ssh config to a submodule, enable agent
This commit is contained in:
parent
4d4f1b6464
commit
9475288da7
2 changed files with 30 additions and 17 deletions
|
|
@ -16,6 +16,7 @@ in
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./config/ssh.nix
|
||||
./services/postgres.nix
|
||||
./services/authentik.nix
|
||||
./services/git.nix
|
||||
|
|
@ -39,27 +40,12 @@ in
|
|||
networking.hostName = "lgm-vps1";
|
||||
networking.domain = "contaboserver.net";
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ (if data ? sshPort then data.sshPort else 37163) gitSSHPort ];
|
||||
settings.PermitRootLogin = "no";
|
||||
settings.PasswordAuthentication = false;
|
||||
extraConfig = ''
|
||||
Match LocalPort ${toString gitSSHPort}
|
||||
AllowUsers forgejo
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
networking.nat.enable = true;
|
||||
networking.nat.internalInterfaces = ["ve-+"];
|
||||
networking.nat.externalInterface = "eth0";
|
||||
|
||||
services.endlessh-go = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
port = 22;
|
||||
};
|
||||
|
||||
services.vscode-server = {
|
||||
enable = true;
|
||||
nodejsPackage = pkgs.nodejs_18;
|
||||
|
|
@ -170,7 +156,6 @@ in
|
|||
config.services.openvscode-server.group
|
||||
];
|
||||
shell = pkgs.fish;
|
||||
openssh.authorizedKeys.keys = [''sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIHFPA2RhqZIVCLwYuEUDQyOnJ4g1R6IfQyhGqZ2Cvvu+AAAABHNzaDo= lgm@lgm-nixos''];
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue