This repository has no description
0

Configure Feed

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

2configs.nixcon-quiz: init on neoprism (quiz.lassul.us)

+64
+21
flake.lock
··· 714 714 "url": "https://cgit.krebsco.de/nix-writers" 715 715 } 716 716 }, 717 + "nixcon-quiz": { 718 + "inputs": { 719 + "nixpkgs": [ 720 + "nixpkgs" 721 + ] 722 + }, 723 + "locked": { 724 + "lastModified": 1790236473, 725 + "narHash": "sha256-JD+IOEI2pLelc99dKpOAkpw+FubcRLZDtU2K8Jotnkg=", 726 + "owner": "lassulus", 727 + "repo": "nixcon-quiz", 728 + "rev": "89d1ca98b25909f326b354b86337b500c162e2af", 729 + "type": "github" 730 + }, 731 + "original": { 732 + "owner": "lassulus", 733 + "repo": "nixcon-quiz", 734 + "type": "github" 735 + } 736 + }, 717 737 "nixos-facter": { 718 738 "locked": { 719 739 "lastModified": 1773858690, ··· 949 969 "nix-darwin": "nix-darwin_2", 950 970 "nix-index-database": "nix-index-database", 951 971 "nix-rosetta-builder": "nix-rosetta-builder", 972 + "nixcon-quiz": "nixcon-quiz", 952 973 "nixos-facter": "nixos-facter", 953 974 "nixos-hardware": "nixos-hardware", 954 975 "nixos-mailserver": "nixos-mailserver",
+3
flake.nix
··· 108 108 mazegame.url = "github:lassulus/mazegame"; 109 109 mazegame.inputs.nixpkgs.follows = "nixpkgs"; 110 110 111 + nixcon-quiz.url = "github:lassulus/nixcon-quiz"; 112 + nixcon-quiz.inputs.nixpkgs.follows = "nixpkgs"; 113 + 111 114 }; 112 115 113 116 outputs =
+37
2configs/nixcon-quiz.nix
··· 1 + let 2 + domain = "quiz.lassul.us"; 3 + port = 8773; 4 + in 5 + { self, ... }: 6 + { 7 + # nixcon-quiz: live multiplayer quiz for NixCon. Everyone answers the same 8 + # question against the same server clock; /spectate is the 16:9 screen for 9 + # the livestream with a QR code to join. 10 + # 11 + # The questions are not part of any repository (whoever reads them knows 12 + # every answer) and stay out of the world-readable store. Copy them over 13 + # after deploying; until then the service is skipped: 14 + # rsync -r --delete ~/src/nixcon-quiz/questions/ root@neoprism.r:/var/lib/nixcon-quiz/questions/ 15 + # ssh root@neoprism.r systemctl restart nixcon-quiz 16 + imports = [ self.inputs.nixcon-quiz.nixosModules.default ]; 17 + 18 + services.nixcon-quiz = { 19 + enable = true; 20 + host = "127.0.0.1"; 21 + inherit port domain; 22 + }; 23 + 24 + # One address may hold a few tabs (players and a spectator screen) and 25 + # reload at a human pace; each tab keeps one event stream open. 26 + services.nginx.appendHttpConfig = '' 27 + limit_conn_zone $binary_remote_addr zone=nixcon_quiz_conns:10m; 28 + limit_req_zone $binary_remote_addr zone=nixcon_quiz_joins:10m rate=5r/s; 29 + ''; 30 + 31 + services.nginx.virtualHosts.${domain}.locations."/api/events".extraConfig = '' 32 + limit_conn nixcon_quiz_conns 16; 33 + limit_req zone=nixcon_quiz_joins burst=30 nodelay; 34 + limit_conn_status 429; 35 + limit_req_status 429; 36 + ''; 37 + }
+3
machines/neoprism/config.nix
··· 122 122 # browser maze game with spectator camera (maze.lassul.us) 123 123 ../../2configs/mazegame.nix 124 124 125 + # live NixCon quiz with a livestream screen (quiz.lassul.us) 126 + ../../2configs/nixcon-quiz.nix 127 + 125 128 # radicle public seed (radicle.lassul.us) 126 129 ../../2configs/radicle.lassul.us.nix 127 130 # radicle identity + node for this machine (/var/lib/rad)