From 7768c71fd8083ea21572de2859fed39c17524baf Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Nov 2026 20:34:59 +0000 Subject: populate: check the settings of sources in the spec The program checks that each source's settings are those lib/types/populate.nix defines for its type, with values of the kinds it defines, for specs from elsewhere than default.nix: a misspelt setting fails, as design.md promises, instead of being ignored, and so does a setting the program would treat as its default because of its kind. This subsumes the check of absolute paths. ln gets a symlink source's target after --, so it can't be taken for an option either. --- pkgs/populate/docs/design.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkgs/populate/docs') diff --git a/pkgs/populate/docs/design.md b/pkgs/populate/docs/design.md index 89bf581..6ad5eea 100644 --- a/pkgs/populate/docs/design.md +++ b/pkgs/populate/docs/design.md @@ -99,6 +99,10 @@ The program checks the spec as `checks.nix` does, with the same messages: neither `..` nor control characters. - Inputs get drawn from sources that exist, not from the source itself, and not in circles. +- The settings of a source are those `lib/types/populate.nix` defines for + its type, of the kinds it defines, e.g. absolute paths for the paths of + `file`, `pass`, and `pipe` sources. `checks.nix` doesn't repeat this, + since `evalSource` checks the types. Checks that depend on whether the target is local come on top, e.g. refusing to copy flakes to remote targets using sudo. `checks.nix` does -- cgit v1.3.1