Wanted to include a couple examples, but one reason I’m starting this thread is that I lost most of my saves…but I remember about one project using the Nix store for document publishing purposes and perhaps a GIS one as well.
Here are two that come to mind:
Fractalide is a programming language built on top of Nix: GitHub - fractalide/fractalide: Reusable Reproducible Composable Software
Styx is a static site generator that uses Nix to compose the output: Home - Styx Static Site Generator
Was able to find some of the links I lost:
- Building a reproducible blog with Nix (by @ysndr)
- Complete overkill or exactly right? Deploying a static site using nix (by @mpickering)
- nix-freeze-tree: Convert a tree of files into fixed-output derivations (see blog post also)
- Reproducible résumés (by @matthewbauer)
Update (7/18/2023):
@toraritte I am currently messing around with a GIS processing pipeline using hydra; ingest from S3, content-addressed dataflow pipeline, egress back to S3. Is there some prior art on this?
I haven’t read either the blog or static site thing, but there’s at least one static site generator using nix:
I am working on my personal dotfiles manager! It is not ready because I do not understand Nix so much…
There may be as I clearly remember a post from around 2018/2019 but I couldn’t find it again… If I do, I’ll make sure to post it. Sorry.
@AndersonTorres Please share it, if you are comfortable with it - sometimes one can learn the most from a project in its early stages. I think it counts especially when it comes to Nix*; I’ve been trying to get a working understanding of it, but for some reason it feels notoriously hard. I remember that I’ve become productive with Erlang/Elixir within 6 months, with very minimal programming background, but Nix feels ever so elusive. One of these days…
Not written in Nix, but for Nix: I wanted to take advantage of Nix store paths to provide better caching for static websites, and ended up writing a webserver for serving flake-built websites with zero-downtime rebuilds.
Just linking the thread on Fractalide
A dump of some blogs made in Nix:
https://foo-dogsquared.github.io/blog/posts/moving-into-nixos/
https://christine.website/blog/thoughts-on-nix-2020-01-28
https://christine.website/blog/i-was-wrong-about-nix-2020-02-10
-
Adding this thread; most notably because of the question:
Also, do you have any general tips for derivation that output data/images ?
-
Found this
default.nix
by accident in the online repo of Chris Warburton that seems to be a build expression for a Tex document.
Updating my repo:
First I was confused that the repo was empty when I realized that content is in the different branches:)
Anyway, another entry: Unifying package managers, workflow engines, and containers: Computational reproducibility with BioNix - Here’s the corresponding GitHub repo and video.
Just realized that Nix “user environments” are also belong in this list as they are not software components/packages themselves but a convenience to provide immutable generations of symlinks to “installed” or “active” software.
$ ll /nix/store/rdcmsz59a7i0zb1blxb6ad0v3s3mai70-user-environment
total 11924
dr-xr-xr-x 2 root root 4096 Dec 31 1969 ./
drwxrwxr-t 9035 root nixbld 12169216 Apr 1 13:15 ../
lrwxrwxrwx 1 root root 65 Dec 31 1969 bin -> /nix/store/pl5aqz1y8jg38qyn0qrmdrxkzml7jhcs-home-manager-path/bin/
lrwxrwxrwx 1 root root 65 Dec 31 1969 etc -> /nix/store/pl5aqz1y8jg38qyn0qrmdrxkzml7jhcs-home-manager-path/etc/
lrwxrwxrwx 1 root root 69 Dec 31 1969 include -> /nix/store/pl5aqz1y8jg38qyn0qrmdrxkzml7jhcs-home-manager-path/include/
lrwxrwxrwx 1 root root 65 Dec 31 1969 lib -> /nix/store/pl5aqz1y8jg38qyn0qrmdrxkzml7jhcs-home-manager-path/lib/
lrwxrwxrwx 1 root root 69 Dec 31 1969 libexec -> /nix/store/pl5aqz1y8jg38qyn0qrmdrxkzml7jhcs-home-manager-path/libexec/
lrwxrwxrwx 1 root root 66 Dec 31 1969 sbin -> /nix/store/pl5aqz1y8jg38qyn0qrmdrxkzml7jhcs-home-manager-path/sbin/
lrwxrwxrwx 1 root root 67 Dec 31 1969 share -> /nix/store/pl5aqz1y8jg38qyn0qrmdrxkzml7jhcs-home-manager-path/share/
lrwxrwxrwx 1 root root 60 Dec 31 1969 manifest.nix -> /nix/store/ljphhfbq253dm5g8q04bkq1bvc4ns8x6-env-manifest.nix
$ ll $(readlink -f /nix/store/rdcmsz59a7i0zb1blxb6ad0v3s3mai70-user-environment/bin) | head
total 232
dr-xr-xr-x 2 root root 4096 Dec 31 1969 ./
dr-xr-xr-x 9 root root 4096 Dec 31 1969 ../
lrwxrwxrwx 1 root root 69 Dec 31 1969 accessdb -> /nix/store/kbfi498kmjffbcrmsbqyspnj7gm3skv8-man-db-2.9.0/bin/accessdb*
lrwxrwxrwx 1 root root 72 Dec 31 1969 ag -> /nix/store/j8qkv76ibxnamdg58zms7bcz9ai6cja5-silver-searcher-2.2.0/bin/ag*
lrwxrwxrwx 1 root root 68 Dec 31 1969 apropos -> /nix/store/kbfi498kmjffbcrmsbqyspnj7gm3skv8-man-db-2.9.0/bin/apropos*
lrwxrwxrwx 1 root root 67 Dec 31 1969 catman -> /nix/store/kbfi498kmjffbcrmsbqyspnj7gm3skv8-man-db-2.9.0/bin/catman*
lrwxrwxrwx 1 root root 76 Dec 31 1969 .catman-wrapped -> /nix/store/kbfi498kmjffbcrmsbqyspnj7gm3skv8-man-db-2.9.0/bin/.catman-wrapped*
lrwxrwxrwx 1 root root 72 Dec 31 1969 cifscreds -> /nix/store/pn70sgslh14zznfzg41crmsdwrw2pb10-cifs-utils-6.9/bin/cifscreds*
lrwxrwxrwx 1 root root 74 Dec 31 1969 cifs.upcall -> /nix/store/pn70sgslh14zznfzg41crmsdwrw2pb10-cifs-utils-6.9/bin/cifs.upcall*