blob: 1c1866edf0ad1a76e6f63bbf0811caa81e40f00e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
];
};
}
|