From 3e0f704000fe6d850987f8ff8cc6de6c298e1550 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 1 Nov 2025 20:07:07 +0300 Subject: [PATCH 1/3] flake: bump nixpkgs Signed-off-by: NotAShelf Change-Id: I37ded98877013bf232dfb8d575980de46a6a6964 --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index e7788c60..5a357a75 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1759362264, - "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", + "lastModified": 1760948891, + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", "type": "github" }, "original": { @@ -53,11 +53,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759386674, - "narHash": "sha256-wg1Lz/1FC5Q13R+mM5a2oTV9TA9L/CHHTm3/PiLayfA=", + "lastModified": 1761880412, + "narHash": "sha256-QoJjGd4NstnyOG4mm4KXF+weBzA2AH/7gn1Pmpfcb0A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "625ad6366178f03acd79f9e3822606dd7985b657", + "rev": "a7fc11be66bdfb5cdde611ee5ce381c183da8386", "type": "github" }, "original": { From 04c8715279894ddeb21c26689f9c7cd9e67a9aec Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 1 Nov 2025 20:23:09 +0300 Subject: [PATCH 2/3] lib: migrate to nixpkgs v2 merge mechanism Signed-off-by: NotAShelf Change-Id: If5bf0e5f302afb9f7018b55a96109c006a6a6964 --- lib/types/custom.nix | 10 ++++------ lib/types/dag.nix | 8 +++++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/types/custom.nix b/lib/types/custom.nix index c42cd2ce..ace9ff1c 100644 --- a/lib/types/custom.nix +++ b/lib/types/custom.nix @@ -3,13 +3,11 @@ inherit (lib.strings) isString stringLength match; inherit (lib.types) listOf mkOptionType; in { - mergelessListOf = elemType: let - super = listOf elemType; - in - super - // { + mergelessListOf = elemType: + mkOptionType { name = "mergelessListOf"; - description = "mergeless ${super.description}"; + description = "mergeless list of ${elemType.description or "values"}"; + check = listOf elemType.check or (x: true); merge = mergeEqualOption; }; diff --git a/lib/types/dag.nix b/lib/types/dag.nix index a42ed513..6d289e27 100644 --- a/lib/types/dag.nix +++ b/lib/types/dag.nix @@ -62,7 +62,13 @@ in rec { inherit (elemType) getSubModules; getSubOptions = prefix: elemType.getSubOptions (prefix ++ [""]); substSubModules = m: dagOf (elemType.substSubModules m); - functor = (defaultFunctor name) // {wrapped = elemType;}; + functor = { + name = name; + type = dagOf; + wrapped = elemType; + payload = elemType; + binOp = a: b: a; + }; nestedTypes.elemType = elemType; }; } From 40a69d81c18c50ca72dad3d9ad511b6640d3fd1e Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 1 Nov 2025 20:50:01 +0300 Subject: [PATCH 3/3] lib/types: be more strict in mergeless list checks Signed-off-by: NotAShelf Change-Id: I90ce0f42984ffbca9dfbdf4d97d2fc636a6a6964 --- lib/types/custom.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types/custom.nix b/lib/types/custom.nix index ace9ff1c..8e8be8a2 100644 --- a/lib/types/custom.nix +++ b/lib/types/custom.nix @@ -7,7 +7,7 @@ in { mkOptionType { name = "mergelessListOf"; description = "mergeless list of ${elemType.description or "values"}"; - check = listOf elemType.check or (x: true); + inherit (lib.types.listOf elemType) check; merge = mergeEqualOption; };