ctucx.git: nixfiles

ctucx' nixfiles

commit 1f148b2a1e612ac45e8ec76093c475d2b9fb5fda
parent 82c6413f971ec9ac6fe72e988b1b7a36d7552795
Author: Leah (ctucx) <git@ctu.cx>
Date: Thu, 1 Dec 2022 17:25:18 +0100

cleanup
7 files changed, 27 insertions(+), 37 deletions(-)
diff --git a/machines/desastro/configuration.nix b/machines/desastro/configuration.nix
@@ -13,6 +13,11 @@
     ./syncthing.nix
   ];
 
+  dns.zones."ctu.cx".subdomains."${config.networking.hostName}".CNAME = [ "desastro.wolfsburg.petabyte.dev." ];
+
+  age.secrets.wireguard-privkey.file    = ../../secrets/desastro/wireguard-privkey.age;
+  age.secrets.restic-server-hector.file = ../../secrets/restic-server/hector.age;
+
   boot = {
     kernel.sysctl."net.ipv4.ip_forward"          = true;
     kernel.sysctl."net.ipv6.conf.all.forwarding" = true;

@@ -38,11 +43,6 @@
     };
   };
 
-  age.secrets.wireguard-privkey.file    = ../../secrets/desastro/wireguard-privkey.age;
-  age.secrets.restic-server-hector.file = ../../secrets/restic-server/hector.age;
-
-  dns.zones."ctu.cx".subdomains.desastro.CNAME = [ "desastro.wolfsburg.petabyte.dev." ];
-
   networking = {
     useDHCP                     = false;
     resolvconf.useLocalResolver = lib.mkForce false;

@@ -73,14 +73,6 @@
   services = {
     email-notify.enable = true;
     vnstat.enable       = true;
-    deluge = {
-      enable       = false;
-      openFirewall = true;
-      user         = "leah";
-      web = {
-        enable = true;
-      };
-    };
   };
 
   system.stateVersion = "20.09";
diff --git a/machines/hector/configuration.nix b/machines/hector/configuration.nix
@@ -9,6 +9,8 @@
     ../../configurations/linux/services/restic-server.nix
   ];
 
+  dns.zones."ctu.cx".subdomains."${config.networking.hostName}".AAAA = [ "2a01:4f9:6b:2d99:2829:acab::1" ];
+
   boot = {
     loader.grub = {
       enable  = true;

@@ -35,8 +37,6 @@
     };
   };
 
-  dns.zones."ctu.cx".subdomains.hector.AAAA = [ "2a01:4f9:6b:2d99:2829:acab::1" ];
-
   networking = {
     useDHCP = false;
 
diff --git a/machines/lollo/configuration.nix b/machines/lollo/configuration.nix
@@ -29,6 +29,8 @@
     ./remote-admin.nix
   ];
 
+  dns.zones."ctu.cx".subdomains."${config.networking.hostName}" = (pkgs.dns.lib.combinators.host "195.39.246.41" "2a0f:4ac0:acab::1");
+
   age.secrets.restic-server-desastro.file = ../../secrets/restic-server/desastro.age;
   age.secrets.restic-server-hector.file   = ../../secrets/restic-server/hector.age;
   age.secrets.restic-server-lollo.file    = ../../secrets/restic-server/lollo.age;

@@ -38,17 +40,9 @@
     efi.canTouchEfiVariables = true;
   };
 
-  dns.zones."ctu.cx".subdomains."${config.networking.hostName}" = (pkgs.dns.lib.combinators.host "195.39.246.41" "2a0f:4ac0:acab::1");
-
   services.email-notify.enable = true;
 
-  networking.useDHCP = false;
-
-  environment.systemPackages = with pkgs; [
-    wireguard-tools
-  ];
-
   system.stateVersion = "21.11";
   home-manager.users.leah.home.stateVersion = "21.11";
-}
 
+}
diff --git a/machines/lollo/router/default.nix b/machines/lollo/router/default.nix
@@ -1,4 +1,4 @@
-{ ... }:
+{ pkgs, ... }:
 
 {
 

@@ -14,6 +14,10 @@
     kernel.sysctl."net.ipv6.conf.all.forwarding" = true;
   };
 
+  environment.systemPackages = with pkgs; [
+    wireguard-tools
+  ];
+
   services.avahi.interfaces = [ "brlan" ];
   networking.useDHCP        = false;
 
diff --git a/machines/lollo/websites/things.home.ctu.cx.nix b/machines/lollo/websites/things.home.ctu.cx.nix
@@ -35,12 +35,12 @@
         kTLS       = true;
         root       = pkgs.ctucx-things;
         locations  = {
-        "/".index              = "index.php index.html";
-        "/".tryFiles           = "$uri $uri/ /index.php";
-        "~ \.php$".extraConfig = ''
-          fastcgi_pass  unix:${config.services.phpfpm.pools.ctucx-things.socket};
-          fastcgi_index index.php;
-        '';
+          "/".index              = "index.php index.html";
+          "/".tryFiles           = "$uri $uri/ /index.php";
+          "~ \.php$".extraConfig = ''
+            fastcgi_pass  unix:${config.services.phpfpm.pools.ctucx-things.socket};
+            fastcgi_index index.php;
+          '';
         };
       };
     };
diff --git a/machines/trabbi/configuration.nix b/machines/trabbi/configuration.nix
@@ -25,6 +25,8 @@
     ./websites
   ];
 
+  dns.zones."ctu.cx".subdomains."${config.networking.hostName}" = (pkgs.dns.lib.combinators.host "89.58.62.171" "2a0a:4cc0:1:2d7::1");
+
   age.secrets.restic-server-lollo.file    = ../../secrets/restic-server/lollo.age;
   age.secrets.restic-server-desastro.file = ../../secrets/restic-server/desastro.age;
   age.secrets.restic-server-hector.file   = ../../secrets/restic-server/hector.age;

@@ -56,10 +58,6 @@
     };
   };
 
-  services.email-notify.enable = true;
-
-  dns.zones."ctu.cx".subdomains."${config.networking.hostName}" = (pkgs.dns.lib.combinators.host "89.58.62.171" "2a0a:4cc0:1:2d7::1");
-
   networking = {
     useDHCP  = false;
 

@@ -80,6 +78,8 @@
     firewall.enable = true;
   };
 
+  services.email-notify.enable = true;
+
   system.stateVersion = "22.05";
   home-manager.users.leah.home.stateVersion = "22.05";
 
diff --git a/machines/wanderduene/configuration.nix b/machines/wanderduene/configuration.nix
@@ -9,6 +9,8 @@
     ../../configurations/linux/services/dns.nix
   ];
 
+  dns.zones."ctu.cx".subdomains."${config.networking.hostName}" = (pkgs.dns.lib.combinators.host "46.38.253.139" "2a03:4000:1:45d::1");
+
   boot = {
     loader.grub = {
       enable  = true;

@@ -37,8 +39,6 @@
     };
   };
 
-  dns.zones."ctu.cx".subdomains.wanderduene = (pkgs.dns.lib.combinators.host "46.38.253.139" "2a03:4000:1:45d::1");
-
   networking = {
     useDHCP  = false;