From 7c10e960357a354fe4976062d4575a332ffb4f4c Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Tue, 31 Dec 2024 13:02:17 +0100 Subject: [PATCH] malcolm: WIP CTF tools --- hosts/malcolm/configuration.nix | 1 + hosts/malcolm/services/www-ctf-feal-no.nix | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 hosts/malcolm/services/www-ctf-feal-no.nix diff --git a/hosts/malcolm/configuration.nix b/hosts/malcolm/configuration.nix index 0d625c3..8f29b6f 100644 --- a/hosts/malcolm/configuration.nix +++ b/hosts/malcolm/configuration.nix @@ -10,6 +10,7 @@ ./services/mysql.nix ./services/nginx.nix + ./services/www-ctf-feal-no.nix ./services/www-kinealbrigtsen-no.nix ]; diff --git a/hosts/malcolm/services/www-ctf-feal-no.nix b/hosts/malcolm/services/www-ctf-feal-no.nix new file mode 100644 index 0000000..cbf8d4c --- /dev/null +++ b/hosts/malcolm/services/www-ctf-feal-no.nix @@ -0,0 +1,14 @@ +{ config, pkgs, lib, ... }: + +{ + services.nginx.virtualHosts."ctf.feal.no" = { + locations = { + "/".return = "302 https://www.feal.no/"; + "/cc/" = { + alias = "${pkgs.cyberchef}/share/cyberchef/"; + index = "index.html"; + }; + "= /cc".return = "302 /cc/"; + }; + }; +}