This commit is contained in:
Qyriad 2026-02-16 18:02:39 +01:00
parent da509d97c7
commit 3765e918d6
18 changed files with 348 additions and 226 deletions

View file

@ -14,32 +14,15 @@ let
mkEnableOption
literalExpression
;
inherit (lib.types)
mkOptionType
;
t = lib.types;
inherit (import ./lib.nix { inherit lib; })
convenientAttrPath
executablePathInStore
recUpdateFoldl
;
pkgs = host.pkgs;
/** Either a list of strings, or a dotted string that will be split. */
convenientAttrPath = t.coercedTo t.str (lib.splitString ".") (t.listOf t.str);
executablePathInStore = mkOptionType {
name = "exepath";
description = "executable path in the Nix store";
descriptionClass = "noun";
merge = lib.mergeEqualOption;
functor = lib.defaultFunctor "exepath";
check = x: if lib.isDerivation x then (
x.meta.mainProgram or null != null
) else (
lib.pathInStore.check x
);
};
in
{
options = {
@ -74,8 +57,9 @@ in
};
configFile = mkOption {
type = t.pathInStore;
type = t.nullOr t.pathInStore;
internal = true;
default = null;
};
unitDropins = mkOption {