From 42e793738257ef4fc30ae3f73e1de42b0d7335a9 Mon Sep 17 00:00:00 2001 From: Markus Schmidl Date: Fri, 3 Jan 2025 18:21:49 +0100 Subject: [PATCH] cleanup flake and uranus --- hosts/uranus/default.nix | 3 +-- hosts/uranus/stateful-jupyter.nix | 2 +- hosts/uranus/stateless-jupyter.nix | 2 -- modules/TLMS/default.nix | 3 ++- modules/{data-hoarder => TLMS}/nginx.nix | 3 ++- modules/data-hoarder/default.nix | 1 - 6 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 hosts/uranus/stateless-jupyter.nix rename modules/{data-hoarder => TLMS}/nginx.nix (86%) diff --git a/hosts/uranus/default.nix b/hosts/uranus/default.nix index 0a2d9a4..3aa6f84 100644 --- a/hosts/uranus/default.nix +++ b/hosts/uranus/default.nix @@ -9,7 +9,6 @@ in { imports = [ ./stateful-jupyter.nix - ./stateless-jupyter.nix ]; microvm = { @@ -84,7 +83,7 @@ in }; - networking.firewall.allowedTCPPorts = [ 80 443 8080 22 ]; + networking.firewall.allowedTCPPorts = [ 8080 ]; users.motd = lib.mkForce (builtins.readFile ./motd.txt); diff --git a/hosts/uranus/stateful-jupyter.nix b/hosts/uranus/stateful-jupyter.nix index bd22756..6b7cbad 100644 --- a/hosts/uranus/stateful-jupyter.nix +++ b/hosts/uranus/stateful-jupyter.nix @@ -51,6 +51,7 @@ in let packages = lib.concatStringsSep " " [ # alphabetically `:sort`ed plz + "bitstring" "geojson" "matplotlib" "numpy" @@ -59,7 +60,6 @@ in "psycopg" "scipy" "seaborn" - "bitstring" ]; in (import ./jupyter-container.nix { diff --git a/hosts/uranus/stateless-jupyter.nix b/hosts/uranus/stateless-jupyter.nix deleted file mode 100644 index 881aaba..0000000 --- a/hosts/uranus/stateless-jupyter.nix +++ /dev/null @@ -1,2 +0,0 @@ -# The plan is to try out how broken the stateless jupyter lab in nixos -{ } diff --git a/modules/TLMS/default.nix b/modules/TLMS/default.nix index 4994809..d3294fe 100644 --- a/modules/TLMS/default.nix +++ b/modules/TLMS/default.nix @@ -4,8 +4,9 @@ ./base.nix ./binary-cache.nix ./general-options.nix + ./monitoring.nix ./net.nix + ./nginx.nix ./wg.nix - ./monitoring.nix ]; } diff --git a/modules/data-hoarder/nginx.nix b/modules/TLMS/nginx.nix similarity index 86% rename from modules/data-hoarder/nginx.nix rename to modules/TLMS/nginx.nix index 45f194d..f5e659f 100644 --- a/modules/data-hoarder/nginx.nix +++ b/modules/TLMS/nginx.nix @@ -22,7 +22,8 @@ let ''; in { - networking.firewall.allowedTCPPorts = [ 80 443 ]; + # Open firewall HTTP and HTTPS if nginx is enabled + networking.firewall.allowedTCPPorts = if config.services.nginx.enable then [ 80 443 ] else []; security.acme.acceptTerms = true; security.acme.defaults.email = "TLMS@protonmail.com"; diff --git a/modules/data-hoarder/default.nix b/modules/data-hoarder/default.nix index 9d785b9..9cc7342 100644 --- a/modules/data-hoarder/default.nix +++ b/modules/data-hoarder/default.nix @@ -8,7 +8,6 @@ ./bureaucrat.nix ./file_sharing.nix ./map.nix - ./nginx.nix ./postgres.nix ./secrets.nix ./socket.nix