Sebastian's personal website

Introducing damright units

Written by Sebastian Dümcke on
Tags:

After some hiatus I am picking up my DAMright project again. DAMright is an opinionated setup for digital asset management (DAM) done right! I see it as a set of recipes on how to process the wealth of digital assets we are collecting on a daily basis and making something useful out of it . It is an ongoing series of posts that I eventually plan to turn into a book.

At the center of this is a personal datalake on a NAS (network attached storage). For a long time I wanted to exclude the technical details on how to set up such a NAS from the book, as they differ too much in terms of hardware/software preferences. However, recently inspired by Guix contributor Ians atomized-guix project, I have now found a solution: introducing (damright units). Ian showed that an operating system can be composed of several functions that all take an operating-system object as input and return the same. I even copied the naming of functions (that I call units) to start with a +.

Guix in combination with (damright units) can thus turn any computer/NAS with a CPU architecture that guix runs on, into a personal datalake and enable all the tools I present within the series of posts. Better still, since guix allows reproducible and declarative definition of an operating system, I can ensure that all readers of DAMright run the exact same software and version (starting from the same guix commit hash).

Here is how such a system definition can look like:

(define my-nas
  (assemble-system %base-system
                   +ssh +dhcp
                   (+admin "admin" (crypt "InitialPassword!" "$6$abc"))
                   (+user-shares '("dad" "wife") '("pass1" "pass2"))
                   (+locate-files "0 22 1 * *"))) 

This defines a minimal system that can be accessed through ssh with a user admin as administrator of the system and two additional users dad and wife which also store their data in the common datalake. This NAS also includes the unit to locate files in a datalake. The units are opinionated in such a way that they assume a particular folder structure (essentially /srv/pool/{DataLake,MetaData,Private}) and particular access patterns (in the example dad and wife each have a folder to store their private data and can contribute to the family datalake via SAMBA network shares only). Thus with enough units available, anyone should be able to define and customize their personal datalake and NAS.

I have not published the code yet as it lacks proper documentation to make it useful to others but that will happen eventually. With this in place I hope to find the time to write a bit more about specific ways to handle common digital assets such as music and pictures. Stay tuned.