This repository has no description
0

Configure Feed

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

neoprism: serve wallpaper.lassul.us with realwallpaper-server

+55
+52
configs/websites/wallpaper.lassul.us.nix
··· 1 + { pkgs, self, ... }: 2 + let 3 + domain = "wallpaper.lassul.us"; 4 + port = 8477; 5 + stateDir = "/var/lib/wallpaper-lassul-us"; 6 + server = self.packages.${pkgs.stdenv.hostPlatform.system}.realwallpaper-server; 7 + in 8 + { 9 + # live world map wallpapers rendered on demand (tools/realwallpaper): 10 + # https://wallpaper.lassul.us/?location=52.52,13.40&variant=lens 11 + imports = [ ./default.nix ]; 12 + 13 + users.users.wallpaper-lassul-us = { 14 + isSystemUser = true; 15 + group = "wallpaper-lassul-us"; 16 + home = stateDir; 17 + }; 18 + users.groups.wallpaper-lassul-us = { }; 19 + 20 + systemd.services.wallpaper-lassul-us = { 21 + description = "realwallpaper renders for ${domain}"; 22 + wantedBy = [ "multi-user.target" ]; 23 + after = [ "network-online.target" ]; 24 + wants = [ "network-online.target" ]; 25 + # astropy wants a writable home for its config 26 + environment.HOME = stateDir; 27 + serviceConfig = { 28 + User = "wallpaper-lassul-us"; 29 + Group = "wallpaper-lassul-us"; 30 + StateDirectory = "wallpaper-lassul-us"; 31 + ExecStart = "${server}/bin/realwallpaper-server --listen 127.0.0.1:${toString port} --state-dir ${stateDir}"; 32 + Restart = "on-failure"; 33 + # one 4K render peaks at a few GB; keep it from starving the host 34 + MemoryHigh = "6G"; 35 + MemoryMax = "8G"; 36 + Nice = 10; 37 + }; 38 + }; 39 + 40 + services.nginx.virtualHosts.${domain} = { 41 + enableACME = true; 42 + forceSSL = true; 43 + locations."/" = { 44 + proxyPass = "http://127.0.0.1:${toString port}"; 45 + recommendedProxySettings = true; 46 + # a request for a new location waits for its render (a minute or two) 47 + extraConfig = '' 48 + proxy_read_timeout 900; 49 + ''; 50 + }; 51 + }; 52 + }
+3
machines/neoprism/config.nix
··· 73 73 # where.is.lassul.us (location from home-assistant on a map) 74 74 ../../configs/websites/where.is.lassul.us 75 75 76 + # wallpaper.lassul.us (realwallpaper rendered on demand) 77 + ../../configs/websites/wallpaper.lassul.us.nix 78 + 76 79 # paste + cyberlocker 77 80 ../../configs/paste 78 81