mirror of
https://git.sr.ht/~magic_rb/website
synced 2024-11-22 08:04:21 +01:00
Add projects page
Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
parent
0a80b11bac
commit
f694cd382f
1
home/projects.org
Normal file
1
home/projects.org
Normal file
|
@ -0,0 +1 @@
|
|||
- [[./projects/tmpfilesd.org][TmpfilesD]]
|
19
home/projects/tmpfilesd.org
Normal file
19
home/projects/tmpfilesd.org
Normal file
|
@ -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.
|
18
make.el
18
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"))))
|
||||
|
|
|
@ -44,6 +44,13 @@
|
|||
<div class="navbar-underline"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-item">
|
||||
<a class="navbar-click" href="/projects.html">
|
||||
<div class="navbar-text">Projects</div>
|
||||
<div class="navbar-underline"></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="navbar-spacer"></div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue