From cca6385ce86e085b145d4cd9b308a83e116a97aa Mon Sep 17 00:00:00 2001 From: Frieder Hannenheim Date: Thu, 30 Jan 2025 13:10:44 +0100 Subject: [PATCH] add notenrechner website --- flake.lock | 57 +++++++++++++++++++++++++++++++++++- flake.nix | 3 ++ modules/web/default.nix | 1 + modules/web/notenrechner.nix | 9 ++++++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 modules/web/notenrechner.nix diff --git a/flake.lock b/flake.lock index aa0bbcc..d00002b 100644 --- a/flake.lock +++ b/flake.lock @@ -78,7 +78,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1681202837, @@ -202,6 +202,27 @@ "type": "indirect" } }, + "notenrechner": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1738236630, + "narHash": "sha256-CP3Ng4QuU9BMHxQ8DLoqsfpSrUPGls8Dhh226u9ct0Y=", + "ref": "refs/heads/main", + "rev": "9b30e7f948135363235640e5d2b34f69ab0accef", + "revCount": 7, + "type": "git", + "url": "https://git.ifsr.de/frieder.hannenheim/notenrechner.git" + }, + "original": { + "type": "git", + "url": "https://git.ifsr.de/frieder.hannenheim/notenrechner.git" + } + }, "poetry2nix": { "inputs": { "flake-utils": "flake-utils_2", @@ -254,6 +275,7 @@ "kpp": "kpp", "nix-index-database": "nix-index-database", "nixpkgs": "nixpkgs_2", + "notenrechner": "notenrechner", "print-interface": "print-interface", "sops-nix": "sops-nix", "vscode-server": "vscode-server" @@ -338,6 +360,21 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -360,6 +397,24 @@ "type": "github" } }, + "utils": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "vscode-server": { "inputs": { "flake-utils": "flake-utils_3", diff --git a/flake.nix b/flake.nix index 75adf68..97f0588 100755 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,9 @@ ese-manual.url = "git+https://git.ifsr.de/ese/manual-website"; ese-manual.inputs.nixpkgs.follows = "nixpkgs"; vscode-server.url = "github:nix-community/nixos-vscode-server"; + notenrechner.url = "git+https://git.ifsr.de/frieder.hannenheim/notenrechner.git"; + notenrechner.inputs.nixpkgs.follows = "nixpkgs"; + course-management = { url = "github:fsr/course-management"; diff --git a/modules/web/default.nix b/modules/web/default.nix index ca0745a..3be7efd 100644 --- a/modules/web/default.nix +++ b/modules/web/default.nix @@ -12,5 +12,6 @@ ./userdir.nix ./ftp.nix ./hyperilo.nix + ./notenrechner.nix ]; } diff --git a/modules/web/notenrechner.nix b/modules/web/notenrechner.nix new file mode 100644 index 0000000..0fd89f5 --- /dev/null +++ b/modules/web/notenrechner.nix @@ -0,0 +1,9 @@ +{ config, specialArgs, ... }: let + domain = "notenrechner.${config.networking.domain}"; +in { + services.nginx.virtualHosts."${domain}" = { + forceSSL = true; + enableACME = true; + root = specialArgs.notenrechner.packages."x86_64-linux".default; + }; +}