forked from clan/clan-core
add sshd module
This commit is contained in:
parent
5b02dda003
commit
8ab6fcd4c0
@ -11,6 +11,7 @@
|
||||
moonlight = ./moonlight.nix;
|
||||
sunshine = ./sunshine.nix;
|
||||
syncthing = ./syncthing.nix;
|
||||
sshd = ./sshd.nix;
|
||||
vm-user = ./vm-user.nix;
|
||||
graphical = ./graphical.nix;
|
||||
xfce = ./xfce.nix;
|
||||
|
18
clanModules/sshd.nix
Normal file
18
clanModules/sshd.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ config, pkgs, ... }: {
|
||||
services.openssh.enable = true;
|
||||
|
||||
services.openssh.hostKeys = [{
|
||||
path = config.clanCore.secrets.borgbackup.secrets."ssh.id_ed25519".path;
|
||||
type = "ed25519";
|
||||
}];
|
||||
|
||||
clanCore.secrets.openssh = {
|
||||
secrets."ssh.id_ed25519" = { };
|
||||
facts."ssh.id_ed25519.pub" = { };
|
||||
generator.path = [ pkgs.coreutils pkgs.openssh ];
|
||||
generator.script = ''
|
||||
ssh-keygen -t ed25519 -N "" -f $secrets/ssh.id_ed25519
|
||||
mv $secrets/ssh.id_ed25519.pub $facts/ssh.id_ed25519.pub
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user