From 78907aa98c1af8624a62ca123d088c6c16424f41 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 21 Jul 2024 01:09:48 +0700 Subject: init --- hosts/cloud/oldsortug/configuration.nix | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 hosts/cloud/oldsortug/configuration.nix (limited to 'hosts/cloud/oldsortug/configuration.nix') diff --git a/hosts/cloud/oldsortug/configuration.nix b/hosts/cloud/oldsortug/configuration.nix new file mode 100644 index 0000000..1c1866e --- /dev/null +++ b/hosts/cloud/oldsortug/configuration.nix @@ -0,0 +1,46 @@ +{ modulesPath, lib, ... }: +{ + imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [ + ./hardware-configuration.nix + ./gitea.nix + ./nginx.nix + ./coturn.nix + ]; + boot = { + growPartition = true; + kernelParams = [ "console=ttyS0" "panic=1" "boot.panic_on_fail" ]; + initrd.kernelModules = [ "virtio_scsi" ]; + kernelModules = [ "virtio_pci" "virtio_net" ]; + loader = { + grub.device = "/dev/sda"; + timeout = 0; + grub.configurationLimit = 0; + }; + }; + services.openssh = { + enable = true; + passwordAuthentication = false; + ports = [5522]; + }; + services.do-agent.enable = true; + networking = { + hostName = "sortug"; # use Digital Ocean metadata server + }; + networking.firewall = { + enable = true; + allowedTCPPorts = [ 40308 80 443 53 51820 5522 ]; + allowedUDPPorts = [ 40308 80 443 53 51820 5522 + 50000 + 50001 + 50002 + 50003 + 50004 + 50005 + 50006 + 50007 + 50008 + 50009 + 50010 + ]; + }; +} -- cgit v1.2.3