feat: mosh

This commit is contained in:
Kat Inskip 2024-10-09 13:57:22 -04:00
parent 91f77cb208
commit 803b8eb29b
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
3 changed files with 22 additions and 0 deletions

View file

@ -11,6 +11,8 @@ in {
allowedTCPPorts = [(list.unsafeHead config.services.openssh.ports)]; allowedTCPPorts = [(list.unsafeHead config.services.openssh.ports)];
}; };
programs.mosh.enable = true;
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {

View file

@ -21,6 +21,7 @@ _: let
}; };
in { in {
arch = "aarch64"; arch = "aarch64";
deploy.hostname = "daiyousei.inskip.me";
type = "NixOS"; type = "NixOS";
modules = [ modules = [
hostConfig hostConfig

View file

@ -1,6 +1,25 @@
resource "oci_core_default_security_list" "this" { resource "oci_core_default_security_list" "this" {
manage_default_resource_id = local.vcn.default_security_list_id manage_default_resource_id = local.vcn.default_security_list_id
dynamic "ingress_security_rules" {
for_each = [
{ from = 60000
to = 61000 }
]
iterator = port
content {
protocol = local.protocol_number.udp
source = "0.0.0.0/0"
description = "Mosh traffic from any origin"
udp_options {
max = port.to
min = port.from
}
}
}
dynamic "ingress_security_rules" { dynamic "ingress_security_rules" {
for_each = [22, 80, 443] for_each = [22, 80, 443]
iterator = port iterator = port