diff options
-rw-r--r-- | chaski/configuration.nix | 1 | ||||
-rw-r--r-- | chaski/services/22f3.nix | 31 | ||||
-rw-r--r-- | flake.lock | 18 | ||||
-rw-r--r-- | flake.nix | 3 |
4 files changed, 53 insertions, 0 deletions
diff --git a/chaski/configuration.nix b/chaski/configuration.nix index 3618572..c2f8cc6 100644 --- a/chaski/configuration.nix +++ b/chaski/configuration.nix @@ -10,6 +10,7 @@ ./hardware-configuration.nix ./services/uplcg.nix ./services/tracktrain.nix + ./services/22f3.nix ]; networking.firewall.allowedTCPPorts = [ 80 443 ]; diff --git a/chaski/services/22f3.nix b/chaski/services/22f3.nix new file mode 100644 index 0000000..877966c --- /dev/null +++ b/chaski/services/22f3.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, inputs, ... }: + +let + roomplans = pkgs.stdenv.mkDerivation { + name = "22f3-roomplans"; + src = inputs.freiraum; + buildInputs = with pkgs; [ poppler_utils inkscape gauche ]; + buildPhase = '' + cp $src/* . + gosh ./generate.scm + ''; + installPhase = '' + mkdir -p $out; + cp out/combined.pdf $out/raumplan.pdf + cp svg/* $out + ''; + }; +in + +{ + services.nginx.virtualHosts."22f3.stuebinm.eu" = { + enableACME = true; + forceSSL = true; + locations."/" = { + root = roomplans.outPath; + extraConfig = '' + autoindex on; + ''; + }; + }; +} @@ -133,6 +133,23 @@ "type": "github" } }, + "freiraum": { + "flake": false, + "locked": { + "lastModified": 1671478879, + "narHash": "sha256-HmXTIFe9xj6wPpr3MeyGAO/XUdyVvAzxFlLwU4s3850=", + "ref": "network", + "rev": "014d5fa10e15e3a2746d2316fc2e0bdb50e12aee", + "revCount": 2, + "type": "git", + "url": "https://git.infra4future.de/stuebinm/22f3-roomplans" + }, + "original": { + "ref": "network", + "type": "git", + "url": "https://git.infra4future.de/stuebinm/22f3-roomplans" + } + }, "gtfsBooks": { "flake": false, "locked": { @@ -290,6 +307,7 @@ "deploy-rs": "deploy-rs", "emacs-overlay": "emacs-overlay", "feeds": "feeds", + "freiraum": "freiraum", "gtfsBooks": "gtfsBooks", "home-manager": "home-manager", "naersk": "naersk", @@ -38,6 +38,9 @@ gtfsBooks.flake = false; walint.url = "git+https://stuebinm.eu/git/walint?ref=playground"; walint.flake = false; + + freiraum.url = "git+https://git.infra4future.de/stuebinm/22f3-roomplans?ref=network"; + freiraum.flake = false; }; outputs = { self, nixpkgs, deploy-rs, ... }@inputs: |