From b7ff973b4b7b5c8241cf0db17f3e460595d3d5b3 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 27 Sep 2022 14:11:23 +0100 Subject: [PATCH] explain package/module distinction, add notes on side tracks --- STYLE.md | 7 +++++++ THOUGHTS.txt | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/STYLE.md b/STYLE.md index 8a42294..15b4f61 100644 --- a/STYLE.md +++ b/STYLE.md @@ -23,3 +23,10 @@ expression or there is more than one reference to `up`, `down` etc. * where a `let` form defines multiple names, put a newline after the token `let`, and indent each name two characters + +* should it be a package or a module? packages are self-contained - + they live in /nix/store/eeeeeee-name and don't directly change + system behaviour by their presence or absense. modules can add to + /etc or /bin or other global state, create services, all that + side-effecty stuff. generally it should be a package unless it + can't be. diff --git a/THOUGHTS.txt b/THOUGHTS.txt index 1585c4c..44e1c86 100644 --- a/THOUGHTS.txt +++ b/THOUGHTS.txt @@ -129,3 +129,36 @@ DONE 17) rename nixwrt references in kernel builder 19) syslogd - use busybox or s6? chat -s -S ogin:--ogin: root / "ip address show dev ppp0 | grep ppp0" 192.168.100.1 "/nix/store/*-s6-linux-init-*/bin/s6-linux-init-hpr -p" + + +Working towards a general goal of having a derivation we can +usefully run `nix path-info` on - or some other tool that will +tell us what's making the images big. The squashfs doesn't +have this information. + +Towards that end (really? can't remember how ...) what would be a +way for packages to declare "I want to add files to /etc"? Is that +even a good idea? + +Thinking we should turn s6-init-files back into a real derivation. + +Tue Sep 27 00:31:45 BST 2022 + +> Thinking we should turn s6-init-files back into a real derivation. + +This turns out to be Not That Simple, because it contains weird shit +(sticky bits and fifos). + +Tue Sep 27 09:50:44 BST 2022 + +* allow modules to register activation scripts that are run on the +root filesystem once all packages are installed + + - do they run on build or on host? if we're upgrading in place + how do we ship filesystem changes to the host? + +or: + +* allow modules to declare environment.*, use pseudofile on build and + create real files on host. will need to keep the implementation on + host faily simple because restricted environment