From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- modules/private/websites/tools/assets/default.nix | 39 ----------------------- 1 file changed, 39 deletions(-) delete mode 100644 modules/private/websites/tools/assets/default.nix (limited to 'modules/private/websites/tools/assets/default.nix') diff --git a/modules/private/websites/tools/assets/default.nix b/modules/private/websites/tools/assets/default.nix deleted file mode 100644 index 0eb476d..0000000 --- a/modules/private/websites/tools/assets/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ lib, pkgs, config, ... }: -let - cfg = config.myServices.websites.tools.assets; - assets_urls = lib.mapAttrs (k: v: pkgs.fetchurl v) config.myEnv.tools.assets; - assets = pkgs.runCommand "assets" {} ('' - mkdir -p $out - cp -a ${./static}/* $out/ - '' + builtins.concatStringsSep "\n" - (lib.mapAttrsToList (k: v: '' - install -D -m644 -T ${v} $out/${k} - '') assets_urls)); -in -{ - options.myServices.websites.tools.assets = { - enable = lib.mkEnableOption "Enable assets website"; - }; - config = lib.mkIf cfg.enable { - services.websites.env.tools.vhostConfs.assets = { - certName = "eldiron"; - addToCerts = true; - hosts = [ "assets.immae.eu" ]; - root = assets; - extraConfig = [ - '' - Use Apaxy "${assets}" "title" - - Options Indexes FollowSymlinks - AllowOverride None - Require all granted - Header always set Last-Modified "Tue, 01 Jan 2020 00:00:00 GMT" - Header always set Cache-Control "public, max-age=31536000, immutable" - Header always set Access-Control-Allow-Origin "*" - Header always set Access-Control-Expose-Headers "*" - - '' - ]; - }; - }; -} -- cgit v1.2.3