gitea repo
This commit is contained in:
commit
f610209aff
66 changed files with 2439 additions and 0 deletions
28
modules/networking/ssh.nix
Normal file
28
modules/networking/ssh.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 1876 ];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
|
||||
sops.secrets."ssh_pubkeys" = {
|
||||
path = "/home/${config.user}/.ssh/authorized_keys";
|
||||
owner = "${config.user}";
|
||||
group = "users";
|
||||
mode = "0600";
|
||||
};
|
||||
|
||||
home-manager.users.${config.user} = { pkgs, config, ... }: {
|
||||
home.file.".ssh/config" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/ssh/${config.home.username}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue