diff --git a/home/projects.org b/home/projects.org new file mode 100644 index 0000000..81afa74 --- /dev/null +++ b/home/projects.org @@ -0,0 +1 @@ +- [[./projects/tmpfilesd.org][TmpfilesD]] diff --git a/home/projects/tmpfilesd.org b/home/projects/tmpfilesd.org new file mode 100644 index 0000000..83b4747 --- /dev/null +++ b/home/projects/tmpfilesd.org @@ -0,0 +1,19 @@ +=tmpfilesd= is a daemon which manages a file hierarchy declaratively. It is unfortunately slightly underused in my opinion. I'm imagining a tool which completely replaces any need for commands like =rm=, =cp=, =mv=, ... and of course their equivalents in your favorite standard library. + +Currently =tmpfilesd= takes a file hierarchy specified in a particular format, as so: + +#+begin_example +# /usr/lib/tmpfiles.d/screen.conf +d /run/screens 1777 root screen 10d +d /run/uscreens 0755 root screen 10d12h +#+end_example + +What's stopping ~tmpfilesd~ from being used as a global system file hierarchy manager, is that it doesn't keep state between runs, as in if =screen.conf= gets removed, ~tmpfilesd~ will not remove the files which used to be declared by it. This means it is not suitable for package installations and such. If this wasn't the case, most packages could be installed without installation bash scripts or the like and could be uninstalled very easily. I am sure many package managers do this sort of thing already, but a dedicated tool would be in my opinion useful. + +Furthermore, it would be desirable if ~tmpfilesd~ could display diffs between different configurations (including what's on disk and in the state) and clearly display what it wants to do. + +With everything described above it could become a ubiquitous file management tool. + +* Proposal + +Utilize a Haskell library, for diffing arbitrary data structures where that data structure would be the file hierarchy. One such library could be [[https://hackage.haskell.org/package/gdiff][gdiff]]. It already provides us with an patch data structure which then can be used for all sorts of things including diff display and actually bringing the filesystem into the desired state. diff --git a/make.el b/make.el index 2a93a2e..fa3ba8c 100644 --- a/make.el +++ b/make.el @@ -126,27 +126,23 @@ :publishing-function org-html-publish-to-templated-html) - ;; Contact - ("redalder-contact" + ("redalder-subpages" :base-directory ,(expand-file-name "./home") :recursive nil :base-extension "org" :exclude "^.*$" - :include ("contact.org") + :include ("contact.org" "links.org" "projects.org") :with-toc nil :publishing-directory ,(expand-file-name "./public_html/") :html-template ,(templated-html-load-template "./templates/empty.html") :publishing-function org-html-publish-to-templated-html) - ;; Links - ("redalder-links" - :base-directory ,(expand-file-name "./home") + ("redalder-projects" + :base-directory ,(expand-file-name "./home/projects") :recursive nil :base-extension "org" - :exclude "^.*$" - :include ("links.org") :with-toc nil - :publishing-directory ,(expand-file-name "./public_html/") + :publishing-directory ,(expand-file-name "./public_html/projects") :html-template ,(templated-html-load-template "./templates/empty.html") :publishing-function org-html-publish-to-templated-html) @@ -171,8 +167,8 @@ :components ("redalder-blog" "redalder-assets" "redalder-homepage" - "redalder-contact" - "redalder-links")) + "redalder-subpages" + "redalder-projects")) ("nixng-publish" :components ("nixng-assets")))) diff --git a/templates/navbar.html b/templates/navbar.html index c25df6d..8413c5a 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -44,6 +44,13 @@
+ +