add sshd module
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
moonlight = ./moonlight.nix;
|
moonlight = ./moonlight.nix;
|
||||||
sunshine = ./sunshine.nix;
|
sunshine = ./sunshine.nix;
|
||||||
syncthing = ./syncthing.nix;
|
syncthing = ./syncthing.nix;
|
||||||
|
sshd = ./sshd.nix;
|
||||||
vm-user = ./vm-user.nix;
|
vm-user = ./vm-user.nix;
|
||||||
graphical = ./graphical.nix;
|
graphical = ./graphical.nix;
|
||||||
xfce = ./xfce.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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user