diff --git a/devices/homie/modules/home-assistant/netdaemon/default.nix b/devices/homie/modules/home-assistant/netdaemon/default.nix index b7a90bcc..1a0cdf82 100644 --- a/devices/homie/modules/home-assistant/netdaemon/default.nix +++ b/devices/homie/modules/home-assistant/netdaemon/default.nix @@ -25,7 +25,7 @@ in { TZ = "America/New_York"; }; - volumes = ["${compiled}/lib/netdaemon-config:/data"]; + volumes = ["${compiled.lib}:/data"]; networks = ["netdaemon"]; }; }; @@ -68,7 +68,7 @@ in { done done - ${compiled.passthru.fetch-deps} . + ${compiled.fetch-deps} . alejandra . rm -r "$FLAKE/.config" ''; diff --git a/devices/homie/modules/home-assistant/netdaemon/package.nix b/devices/homie/modules/home-assistant/netdaemon/package.nix index 9adfd66b..b1b49565 100644 --- a/devices/homie/modules/home-assistant/netdaemon/package.nix +++ b/devices/homie/modules/home-assistant/netdaemon/package.nix @@ -1,22 +1,36 @@ { buildDotnetModule, dotnetCorePackages, -}: -buildDotnetModule { +}: let pname = "netdaemon-config"; - version = "0.0.0"; +in + buildDotnetModule { + inherit pname; + version = "0.0.0"; - src = - builtins.filterSource - (file: type: - (type != "directory") - || (baseNameOf file != "default.nix" && baseNameOf file != "package.nix")) - ./.; + src = + builtins.filterSource + (file: type: + (type != "directory") + || (builtins.all (f: baseNameOf file != f) [ + ".envrc" + "deps.nix" + "default.nix" + "netdaemon.nix" + "package.nix" + ])) + ./.; - projectFile = "netdaemon.csproj"; - nugetDeps = ./deps.nix; + projectFile = "netdaemon.csproj"; + nugetDeps = ./deps.nix; - dotnet-sdk = dotnetCorePackages.sdk_8_0; - dotnet-runtime = dotnetCorePackages.runtime_8_0; - executables = []; -} + dotnet-sdk = dotnetCorePackages.sdk_8_0; + dotnet-runtime = dotnetCorePackages.runtime_8_0; + executables = []; + + postFixup = '' + cp -r $out/lib/${pname} $lib + ''; + + outputs = ["out" "lib"]; + }