summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-09-21 23:22:11 +0200
committerAdrian Kummerlaender2018-09-21 23:22:11 +0200
commite710e6ed8f6aacb6ab3a839f40d114541919f91a (patch)
tree403e63918fddf3bbc10ed2b186fd4012cd0c6530 /host
parent2da91a91110d4541fc09266b9ae2456a2b5c0f35 (diff)
downloadnixos_system-e710e6ed8f6aacb6ab3a839f40d114541919f91a.tar
nixos_system-e710e6ed8f6aacb6ab3a839f40d114541919f91a.tar.gz
nixos_system-e710e6ed8f6aacb6ab3a839f40d114541919f91a.tar.bz2
nixos_system-e710e6ed8f6aacb6ab3a839f40d114541919f91a.tar.lz
nixos_system-e710e6ed8f6aacb6ab3a839f40d114541919f91a.tar.xz
nixos_system-e710e6ed8f6aacb6ab3a839f40d114541919f91a.tar.zst
nixos_system-e710e6ed8f6aacb6ab3a839f40d114541919f91a.zip
Add basic Gogs, NGINX setup for automatix
Diffstat (limited to 'host')
-rw-r--r--host/automatix.nix46
1 files changed, 44 insertions, 2 deletions
diff --git a/host/automatix.nix b/host/automatix.nix
index fd819f4..996a96a 100644
--- a/host/automatix.nix
+++ b/host/automatix.nix
@@ -6,8 +6,50 @@
boot.loader.grub = {
enable = true;
version = 2;
- device = "/dev/sda";
+ device = "/dev/sda";
};
- networking.hostName = "automatix";
+ networking = {
+ hostName = "automatix";
+
+ firewall = {
+ allowedTCPPorts = [ 22 80 443 ];
+ };
+ };
+
+ services = {
+ gogs = {
+ enable = true;
+ database.type = "sqlite3";
+
+ appName = "~/projects";
+ domain = "code.kummerlaender.eu";
+ rootUrl = "http://code.kummerlaender.eu/";
+
+ extraConfig = ''
+ [service]
+ DISABLE_REGISTRATION = true
+ SHOW_REGISTRATION_BUTTON = false
+ '';
+ };
+
+ nginx = {
+ enable = true;
+
+ recommendedGzipSettings = true;
+ recommendedOptimisation = true;
+ recommendedProxySettings = true;
+ recommendedTlsSettings = true;
+
+ virtualHosts."code.kummerlaender.eu" = {
+ addSSL = true;
+ enableACME = true;
+ locations = {
+ "/" = {
+ proxyPass = "http://localhost:3000/";
+ };
+ };
+ };
+ };
+ };
}