aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/docs/design.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-13 20:36:51 +0000
committertv <tv@krebsco.de>2026-11-13 22:01:56 +0100
commit68e42cf9b0ca5a512500e7dc524183872b3ebaa5 (patch)
tree7c375d54f1506acf96a2fb68834da9ae2c7f5715 /pkgs/populate/docs/design.md
parentce2cd2553a937d84f1a78386ab28502e89f247d6 (diff)
populate: decide whether a target is local like isLocalTarget
For specs whose target's local is null, the program decides whether the target is local like krops' lib's isLocalTarget: an empty LOGNAME or HOSTNAME counts as unset, as with lib.maybeEnv, and /etc/hostname's labels can be of any length, as with lib.types.label. is_local_with, pure, has unit tests.
Diffstat (limited to 'pkgs/populate/docs/design.md')
-rw-r--r--pkgs/populate/docs/design.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/populate/docs/design.md b/pkgs/populate/docs/design.md
index cc78a65..639d15b 100644
--- a/pkgs/populate/docs/design.md
+++ b/pkgs/populate/docs/design.md
@@ -153,9 +153,11 @@ places populate must not touch, check this after every phase.
## Execution
Whether a target is local is what the target's `local` says, or, if
-that's null, gets decided when the program runs: it is, if its user is
-`LOGNAME` and its host is `localhost` or the host's name, from `HOSTNAME`
-or `/etc/hostname`. `default.nix` decides during evaluation, like the other
+that's null, gets decided when the program runs, like krops' lib's
+`isLocalTarget` does: it is, if its user is `LOGNAME`, or null if that's
+empty or unset, and its host is `localhost` or the host's name, from
+`HOSTNAME`, or, if that's empty or unset, the only line of `/etc/hostname`
+that is a label. `default.nix` decides during evaluation, like the other
functions of krops. For a local target, populate runs commands directly.
For a remote target, populate runs commands over ssh, sharing one master