summaryrefslogtreecommitdiff
path: root/hosts/cloud/sing/configuration.nix
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2024-07-21 01:09:48 +0700
committerpolwex <polwex@sortug.com>2024-07-21 01:09:48 +0700
commit78907aa98c1af8624a62ca123d088c6c16424f41 (patch)
tree477fe923810522acc211b7514e4931af80f33ed7 /hosts/cloud/sing/configuration.nix
init
Diffstat (limited to 'hosts/cloud/sing/configuration.nix')
-rw-r--r--hosts/cloud/sing/configuration.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/hosts/cloud/sing/configuration.nix b/hosts/cloud/sing/configuration.nix
new file mode 100644
index 0000000..8428b10
--- /dev/null
+++ b/hosts/cloud/sing/configuration.nix
@@ -0,0 +1,38 @@
+{ modulesPath, pkgs, ... }:
+{
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ (modulesPath + "/profiles/qemu-guest.nix")
+ ./disk-config.nix
+ ];
+ boot.loader.grub = {
+ efiSupport = true;
+ };
+
+ # enable flakes
+ nix = {
+ package = pkgs.nixFlakes;
+ extraOptions = ''
+ experimental-features = nix-command flakes
+ '';
+ settings = {
+ keep-outputs = true;
+ keep-derivations = true;
+ };
+ };
+
+ services.openssh = {
+ enable = true;
+ passwordAuthentication = false;
+ ports = [5522];
+ };
+ services.do-agent.enable = true;
+ networking = {
+ hostName = "yagonet-sing"; # use Digital Ocean metadata server
+ };
+ networking.firewall = {
+ enable = true;
+ allowedTCPPorts = [ 993 465 40308 80 443 53 51820 5522 ];
+ allowedUDPPorts = [ 993 465 40308 80 443 53 50000 50001 50002 50003 50004 50005 50006 50007 50008 50009 50010 51820 5522 ];
+ };
+}