Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save serpent213/763d48bb453528aaf2e7568296643f78 to your computer and use it in GitHub Desktop.
Save serpent213/763d48bb453528aaf2e7568296643f78 to your computer and use it in GitHub Desktop.
Custom module for NodeRED via dream2nix
diff --git a/heimchen/flake.nix b/heimchen/flake.nix
index d8638c3..fd34ad5 100644
--- a/heimchen/flake.nix
+++ b/heimchen/flake.nix
@@ -13,9 +13,12 @@
nixvim.url = "github:nix-community/nixvim/nixos-23.11";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
+
+ dream2nix.url = "github:nix-community/dream2nix";
+ dream2nix.inputs.nixpkgs.follows = "nixpkgs";
};
- outputs = { self, nixpkgs, home-manager, agenix, nixvim, ... }: {
+ outputs = { self, nixpkgs, home-manager, agenix, nixvim, dream2nix, ... }: {
nixosConfigurations.heimchen = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
diff --git a/heimchen/nixos/configuration.nix b/heimchen/nixos/configuration.nix
index 060b024..fed5ec1 100644
--- a/heimchen/nixos/configuration.nix
+++ b/heimchen/nixos/configuration.nix
@@ -2,14 +2,15 @@
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, dream2nix, ... }:
let
- nodeRedUserDir = "/persist/node-red";
cgos-mod = config.boot.kernelPackages.callPackage ./cgos/kmod.nix {};
cgos = pkgs.callPackage ./cgos/cgos.nix {};
cgos-util = pkgs.callPackage ./cgos/util.nix { inherit cgos; };
cgos-cgctl = pkgs.callPackage ../cgctl { inherit cgos; };
cgos-cgexporter = pkgs.callPackage ../cgexporter { inherit cgos; };
+ nodeRedUserDir = "/persist/node-red";
+ node-red-contrib-home-assistant-websocket = pkgs.callPackage ./node-red/node-red-contrib-home-assistant-websocket.nix { inherit dream2nix; };
in
{
imports =
@@ -183,6 +183,10 @@ in
};
};
+ systemd.tmpfiles.rules = [
+ "L+ ${config.services.node-red.userDir}/node_modules 0755 ${config.services.node-red.user} ${config.services.node-red.group} - ${node-red-contrib-home-assistant-websocket}/lib/node_modules"
+ ];
+
services = {
# workaround build bug caused by hardened kernel on build host?
# logrotate.checkConfig = false;
diff --git a/heimchen/nixos/node-red/node-red-contrib-home-assistant-websocket.nix b/heimchen/nixos/node-red/node-red-contrib-home-assistant-websocket.nix
new file mode 100644
index 0000000..f4c90a4
--- /dev/null
+++ b/heimchen/nixos/node-red/node-red-contrib-home-assistant-websocket.nix
@@ -0,0 +1,35 @@
+{
+ lib,
+ config,
+ dream2nix,
+ ...
+}: {
+ imports = [
+ dream2nix.modules.dream2nix.nodejs-package-lock
+ dream2nix.modules.dream2nix.nodejs-granular
+ ];
+
+ deps = {nixpkgs, ...}: {
+ inherit
+ (nixpkgs)
+ fetchFromGitHub
+ mkShell
+ stdenv
+ ;
+ };
+
+ nodejs-package-lock = {
+ source = config.deps.fetchFromGitHub {
+ owner = "zachowj";
+ repo = "node-red-contrib-home-assistant-websocket";
+ rev = "v0.59.0";
+ sha256 = "sha256-xxxxxxxVptNqK3cNrkLnyP1FzBd81XaszVucEnmBy4Y=";
+ };
+ };
+
+ name = "node-red-contrib-home-assistant-websocket";
+ version = "0.59.0";
+ mkDerivation = {
+ src = config.nodejs-package-lock.source;
+ };
+}
warning: updating lock file '/home/self/nixos/heimchen/flake.lock':
• Added input 'dream2nix':
'github:nix-community/dream2nix/774019d486a6c550edf669c40269acd526e27885' (2024-01-20)
• Added input 'dream2nix/nixpkgs':
follows 'nixpkgs'
• Added input 'dream2nix/purescript-overlay':
'github:thomashoneyman/purescript-overlay/047c7933abd6da8aa239904422e22d190ce55ead' (2023-09-29)
• Added input 'dream2nix/purescript-overlay/nixpkgs':
follows 'dream2nix/nixpkgs'
• Added input 'dream2nix/purescript-overlay/slimlock':
'github:thomashoneyman/slimlock/b5c6cdcaf636ebbebd0a1f32520929394493f1a6' (2023-07-06)
• Added input 'dream2nix/purescript-overlay/slimlock/nixpkgs':
follows 'dream2nix/purescript-overlay/nixpkgs'
• Added input 'dream2nix/pyproject-nix':
'github:davhau/pyproject.nix/5a06a2697b228c04dd2f35659b4b659ca74f7aeb' (2023-12-13)
warning: Git tree '/home/self/nixos' is dirty
building the system configuration...
warning: Git tree '/home/self/nixos' is dirty
error:
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:918:24:
917| let f = attrPath:
918| zipAttrsWith (n: values:
| ^
919| let here = attrPath ++ [n]; in
… while calling 'g'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:701:19:
700| g =
701| name: value:
| ^
702| if isAttrs value && cond value
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:704:20:
703| then recurse (path ++ [name]) value
704| else f (path ++ [name]) value;
| ^
705| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `system.build.toplevel':
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/activation/top-level.nix':
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/activation/top-level.nix:71:12:
70| # Replace runtime dependencies
71| system = foldr ({ oldDependency, newDependency }: drv:
| ^
72| pkgs.replaceDependency { inherit oldDependency newDependency drv; }
… while calling 'foldr'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/lists.nix:53:20:
52| */
53| foldr = op: nul: list:
| ^
54| let
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/lists.nix:60:8:
59| else op (elemAt list n) (fold' (n + 1));
60| in fold' 0;
| ^
61|
… while calling 'fold''
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/lists.nix:56:15:
55| len = length list;
56| fold' = n:
| ^
57| if n == len
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/activation/top-level.nix:68:10:
67| then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"
68| else showWarnings config.warnings baseSystem;
| ^
69|
… while calling 'showWarnings'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/trivial.nix:414:28:
413|
414| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
| ^
415|
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/trivial.nix:414:33:
413|
414| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
| ^
415|
… while calling 'foldr'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/lists.nix:53:20:
52| */
53| foldr = op: nul: list:
| ^
54| let
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/lists.nix:60:8:
59| else op (elemAt list n) (fold' (n + 1));
60| in fold' 0;
| ^
61|
… while calling 'fold''
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/lists.nix:56:15:
55| len = length list;
56| fold' = n:
| ^
57| if n == len
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/activation/top-level.nix:48:16:
47| # makes it bootable. See `activatable-system.nix`.
48| baseSystem = pkgs.stdenvNoCC.mkDerivation ({
| ^
49| name = "nixos-system-${config.system.name}-${config.system.nixos.label}";
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/pkgs/stdenv/generic/make-derivation.nix:598:3:
597| in
598| fnOrAttrs:
| ^
599| if builtins.isFunction fnOrAttrs
… while calling 'g'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:701:19:
700| g =
701| name: value:
| ^
702| if isAttrs value && cond value
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:704:20:
703| then recurse (path ++ [name]) value
704| else f (path ++ [name]) value;
| ^
705| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `system.systemBuilderArgs':
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:844:59:
843| if isDefined then
844| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
845| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'merge'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/types.nix:556:20:
555| check = isAttrs;
556| merge = loc: defs:
| ^
557| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/types.nix:557:35:
556| merge = loc: defs:
557| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
| ^
558| (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue
… while calling 'filterAttrs'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:381:5:
380| # The attribute set to filter
381| set:
| ^
382| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:382:29:
381| set:
382| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
| ^
383|
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:382:62:
381| set:
382| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
| ^
383|
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/types.nix:557:51:
556| merge = loc: defs:
557| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
| ^
558| (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/types.nix:557:86:
556| merge = loc: defs:
557| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
| ^
558| (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/activation/activatable-system.nix':
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/activation/activation-script.nix:133:18:
132| apply = set: set // {
133| script = systemActivationScript set false;
| ^
134| };
… while calling 'systemActivationScript'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/activation/activation-script.nix:20:33:
19|
20| systemActivationScript = set: onlyDry: let
| ^
21| set' = mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set;
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/activation/activation-script.nix:49:9:
48|
49| ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
| ^
50|
… while calling 'textClosureMap'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/strings-with-deps.nix:75:35:
74|
75| textClosureMap = f: predefined: names:
| ^
76| concatStringsSep "\n" (map f (textClosureList predefined names));
… while calling 'id'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/trivial.nix:14:5:
13| # The value to return
14| x: x;
| ^
15|
… while calling 'g'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:701:19:
700| g =
701| name: value:
| ^
702| if isAttrs value && cond value
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:704:20:
703| then recurse (path ++ [name]) value
704| else f (path ++ [name]) value;
| ^
705| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `system.activationScripts.etc.text':
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/etc/etc-activation.nix':
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:918:24:
917| let f = attrPath:
918| zipAttrsWith (n: values:
| ^
919| let here = attrPath ++ [n]; in
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/types.nix:581:29:
580| merge = loc: defs:
581| zipAttrsWith (name: defs:
| ^
582| let merged = mergeDefinitions (loc ++ [name]) elemType defs;
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/etc/etc.nix':
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:160:39:
159| then value
160| else { ${elemAt attrPath n} = atDepth (n + 1); };
| ^
161| in atDepth 0;
… while calling 'atDepth'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:157:17:
156| len = length attrPath;
157| atDepth = n:
| ^
158| if n == len
… while evaluating derivation 'etc'
whose name attribute is located at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/pkgs/stdenv/generic/make-derivation.nix:348:7
… while evaluating attribute 'buildCommand' of derivation 'etc'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/pkgs/build-support/trivial-builders/default.nix:87:14:
86| enableParallelBuilding = true;
87| inherit buildCommand name;
| ^
88| passAsFile = [ "buildCommand" ]
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/etc/etc.nix:54:7:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… while calling 'concatMapStringsSep'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/strings.nix:117:5:
116| # List of input strings
117| list: concatStringsSep sep (map f list);
| ^
118|
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/etc/etc.nix:54:33:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/etc/etc.nix:54:43:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… while calling 'concatMapStringsSep'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/strings.nix:117:5:
116| # List of input strings
117| list: concatStringsSep sep (map f list);
| ^
118|
… while calling 'escapeShellArg'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/strings.nix:443:20:
442| */
443| escapeShellArg = arg: "'${replaceStrings ["'"] ["'\\''"] (toString arg)}'";
| ^
444|
… while calling 'g'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:701:19:
700| g =
701| name: value:
| ^
702| if isAttrs value && cond value
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:704:20:
703| then recurse (path ++ [name]) value
704| else f (path ++ [name]) value;
| ^
705| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `environment.etc."tmpfiles.d".source':
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/boot/systemd/tmpfiles.nix':
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… while evaluating derivation 'tmpfiles.d'
whose name attribute is located at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/pkgs/stdenv/generic/make-derivation.nix:348:7
… while evaluating attribute 'paths' of derivation 'tmpfiles.d'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/boot/systemd/tmpfiles.nix:156:9:
155| name = "tmpfiles.d";
156| paths = map (p: p + "/lib/tmpfiles.d") cfg.packages;
| ^
157| postBuild = ''
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/nixos/modules/system/boot/systemd/tmpfiles.nix:156:22:
155| name = "tmpfiles.d";
156| paths = map (p: p + "/lib/tmpfiles.d") cfg.packages;
| ^
157| postBuild = ''
… while evaluating derivation 'nixos-tmpfiles.d'
whose name attribute is located at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/pkgs/stdenv/generic/make-derivation.nix:348:7
… while evaluating attribute 'text' of derivation 'nixos-tmpfiles.d'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/pkgs/build-support/trivial-builders/default.nix:148:16:
147| runCommand name
148| { inherit text executable checkPhase allowSubstitutes preferLocalBuild;
| ^
149| passAsFile = [ "text" ];
… while calling 'g'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:701:19:
700| g =
701| name: value:
| ^
702| if isAttrs value && cond value
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/attrsets.nix:704:20:
703| then recurse (path ++ [name]) value
704| else f (path ++ [name]) value;
| ^
705| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `systemd.tmpfiles.rules':
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:844:59:
843| if isDefined then
844| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
845| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'merge'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/types.nix:526:20:
525| check = isList;
526| merge = loc: defs:
| ^
527| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/types.nix:527:35:
526| merge = loc: defs:
527| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
| ^
528| imap1 (m: def':
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/lists.nix:165:29:
164| */
165| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
166|
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/lists.nix:165:32:
164| */
165| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
166|
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/types.nix:528:21:
527| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
528| imap1 (m: def':
| ^
529| (mergeDefinitions
… while calling anonymous lambda
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/nskpydfj372yq0hp12fk1i3dv07nhhk3-source/heimchen/nixos/configuration.nix':
… from call site
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/jp7nlmyb8hwhf3d11s5ylkry7kv4bncv-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
error: cannot coerce a set to a string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment