adyya-flake/networking/ssh.mod.nix
Ittihadyya 7bbf371287 Moved vscodium definition.
added caddyfile plugin to vscodium.
used nixfmt.
2024-11-22 14:34:14 +02:00

47 lines
1.5 KiB
Nix

{
universal.modules = [
({
services.openssh = {
enable = true;
settings.PasswordAuthentication = false; # english is a fake language, apparently it's not "authentification", literally go explode, it makes sense but i am still mad -e
# ports = [ 1295 ]; # can just do it on 22 bc of the preceding setting, i think.
openFirewall = true;
banner = "This place is not a place of honor... no highly esteemed deed is commemorated here... nothing valued is here.\nWhat is here was dangerous and repulsive to us.\nThis message is a warning about danger.\n";
};
users.users.emv.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDRf6PfZtcUN5GJ3hcxoxencU2EMRBeu4BIyBSOgKReD emv@capsaicin"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2r4QfMmGcPUs4mpYd1YgcLKwwNpBmuHbZVT5VC+8W7 emv@menthol"
];
})
];
fructose.modules = [
{
services.openssh.ports = [
22
222
];
}
];
personal.home_modules = [
{
programs.ssh = {
enable = true;
matchBlocks =
let
to = hostname: {
inherit hostname;
user = "emv";
identityFile = "~/.ssh/id_ed25519";
};
in
{
glucose = to "glucose.wg";
fructose = to "fructose.wg";
capsaicin = to "capsaicin.wg";
menthol = to "menthol.wg";
aspartame = to "aspartame.wg";
};
};
}
];
}