my nixos config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

split off website stuff into its own file

chfour 20f3be93 f297c8e8

+38 -30
+4 -30
machines/fovps/services/caddy/default.nix
··· 1 - { pkgs, config, website, ... }: 1 + { pkgs, config, ... }: 2 2 3 3 let 4 - websiteDest = "${config.services.caddy.dataDir}/website"; 5 - websitePath = builtins.toString website.website.out; 6 - 7 4 disallowedAgents = [ 8 5 # https://git.madhouse-project.org/iocaine/nam-shub-of-enki/src/branch/main/org/module 9 6 # https://momenticmarketing.com/blog/ai-search-crawlers-bots ··· 39 36 # apparently that also blocks normal googlebot. oops! 40 37 ]; 41 38 in { 39 + imports = [ 40 + ./website.nix 41 + ]; 42 42 services.caddy.enable = true; 43 43 services.caddy.extraConfig = let 44 44 agentsRegex = with pkgs; "(?i)" + lib.strings.escape [ "'" "\\" ] ··· 68 68 } 69 69 ''; 70 70 services.caddy.virtualHosts = { 71 - "eeep.ee".extraConfig = '' 72 - import errors 73 - import bots 74 - 75 - root * ${websiteDest} 76 - encode zstd gzip 77 - file_server 78 - ''; 79 - 80 71 "files.eeep.ee".extraConfig = '' 81 72 import errors 82 73 import bots ··· 87 78 browse ${./browsetemplate.html} 88 79 } 89 80 ''; 90 - }; 91 - 92 - system.activationScripts = { 93 - copyWebsite = { 94 - text = '' 95 - # epic hack hacky hackk 96 - mkdir -p ${websiteDest} 97 - ${pkgs.lib.getExe pkgs.rsync} -r --copy-links --delete \ 98 - ${websitePath}/var/www/ ${websiteDest} 99 - 100 - # :trol: 101 - ${pkgs.lib.getExe pkgs.gnused} -i \ 102 - 's|/nix/store/VERY5p3c14lsecretv4luereplaceme0-chfour-website|${websitePath}|' \ 103 - ${websiteDest}/index.html 104 - ''; 105 - deps = []; 106 - }; 107 81 }; 108 82 networking.firewall.allowedTCPPorts = [ 80 443 ]; 109 83 networking.firewall.allowedUDPPorts = [ 80 443 ];
+34
machines/fovps/services/caddy/website.nix
··· 1 + { pkgs, config, website, ... }: 2 + 3 + let 4 + websiteDest = "${config.services.caddy.dataDir}/website"; 5 + websitePath = builtins.toString website.website.out; 6 + in 7 + { 8 + services.caddy.virtualHosts = { 9 + "eeep.ee".extraConfig = '' 10 + import errors 11 + import bots 12 + 13 + root * ${websiteDest} 14 + encode zstd gzip 15 + file_server 16 + ''; 17 + }; 18 + system.activationScripts = { 19 + copyWebsite = { 20 + text = '' 21 + # epic hack hacky hackk 22 + mkdir -p ${websiteDest} 23 + ${pkgs.lib.getExe pkgs.rsync} -r --copy-links --delete \ 24 + ${websitePath}/var/www/ ${websiteDest} 25 + 26 + # :trol: 27 + ${pkgs.lib.getExe pkgs.gnused} -i \ 28 + 's|/nix/store/VERY5p3c14lsecretv4luereplaceme0-chfour-website|${websitePath}|' \ 29 + ${websiteDest}/index.html 30 + ''; 31 + deps = []; 32 + }; 33 + }; 34 + }