summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@nullring.xyz>2026-03-09 18:51:40 -0700
committerPreston Pan <ret2pop@nullring.xyz>2026-03-09 18:51:40 -0700
commit9776145fc444bea2729efe8ee104b41b0ffe3f38 (patch)
tree6066c221c78a0e8535fab0a095b9e0b21131ef94 /flake.nix
parent1df08f1ebcc46e236f1351d48e92e723816ffdaf (diff)
add descriptions to everything; checkpoint
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix21
1 files changed, 20 insertions, 1 deletions
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 <<EOF > $TMPDIR/policy.xml
<policymap>
@@ -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
];
};
};