From 9776145fc444bea2729efe8ee104b41b0ffe3f38 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Mon, 9 Mar 2026 18:51:40 -0700 Subject: add descriptions to everything; checkpoint --- flake.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index b2b8e9c..e0bf9d1 100644 --- a/flake.nix +++ b/flake.nix @@ -40,10 +40,18 @@ inherit specialArgs; }; + affinity = nixmacs.nixosConfigurations.affinity.extendModules { + inherit specialArgs; + }; + installer-iso = installer.config.system.build.isoImage; spontaneityHost = spontaneity.config.monorepo.vars.orgHost; + secretsPath = affinity.config.home-manager.sops.defaultSymlinkPath; + + ntfyFile = affinity.config.monorepo.vars.ntfySecret; + topology = nixmacs.topology.x86_64-linux.config.output; pre-commit-check = git-hooks.lib.${system}.run { @@ -145,6 +153,7 @@ fi pkgs.pandoc pkgs.rsass pkgs.minify + pkgs.woff2 (pkgs.texlive.combine { inherit (pkgs.texlive) @@ -169,6 +178,7 @@ cp -a . $HOME/monorepo/ cd $HOME/monorepo mkdir -p mindmap/img rsass style.scss | minify --type=css > style.css +minify --type=css -o syntax.css syntax.css cat < $TMPDIR/policy.xml @@ -221,7 +231,8 @@ emacs -q --batch \ --eval '(require (quote htmlize))' \ --eval '(require (quote nix-mode))' \ --eval '(setq org-html-htmlize-output-type (quote css))' \ - --eval '(org-publish-all t)' || (echo "FAIL:" && cat /build/*.log && exit 1) + --eval '(org-publish-all t)' \ + --eval '(org-publish-all nil)' || (echo "FAIL:" && cat /build/*.log && exit 1) echo "Setting up Graph View..." ${publish-org-roam-ui.packages.${system}.default}/bin/build-org-roam-graph \ @@ -242,6 +253,11 @@ cp ${garamond}/ttf/CormorantGaramond-Medium.ttf $out/fonts/ cp ${garamond}/ttf/CormorantGaramond-MediumItalic.ttf $out/fonts/ cp ${garamond}/ttf/CormorantGaramond-Bold.ttf $out/fonts/ +for font in $out/fonts/*.ttf; do + woff2_compress "$font" + rm "$font" +done + cp -r $HOME/website_html/. $out/ cp ${topology}/main.svg $out/img/topology.svg cp ${installer-iso}/iso/*.iso $out/installer.iso @@ -272,12 +288,15 @@ ${pre-commit-check.shellHook} git config branch.main.mergeoptions "--no-ff" alias gprune='git branch --merged | grep -v -E "^\*|main|master|dev" | xargs -r git branch -d' alias serve='cd result; python3 -m http.server 10005' +alias build='nix build .#website && curl -u "ret2pop:$(grep ADMIN_PASSWORD "${secretsPath}/${ntfyFile}" | cut -d "\"" -f 2)" -d "Website build done!" https://ntfy.ret2pop.net' ''; buildInputs = [ deadnix lychee python3 miniserve + rsass + imagemagickBig ]; }; }; -- cgit v1.3