fix: use recursiveUpdate instead of // to preserve packages.default

The // operator does shallow merge, so packages.x86_64-linux.test-vm
overwrote the entire packages.x86_64-linux attrset, losing the default
package. nixpkgs.lib.recursiveUpdate properly merges nested attrsets.
This commit is contained in:
NeilClack
2026-07-10 14:18:47 -05:00
parent 3e3c174032
commit 779bc77c5b
+2 -5
View File
@@ -12,6 +12,7 @@
nixpkgs, nixpkgs,
flake-utils, flake-utils,
}: }:
nixpkgs.lib.recursiveUpdate
(flake-utils.lib.eachDefaultSystem ( (flake-utils.lib.eachDefaultSystem (
system: system:
let let
@@ -66,10 +67,7 @@
]; ];
postInstall = '' postInstall = ''
# Create the destination
mkdir -p $out/share/rhemawave mkdir -p $out/share/rhemawave
# Copy everything from your local share/rhemawave/* into the store
cp -r share/rhemawave/* $out/share/rhemawave/ cp -r share/rhemawave/* $out/share/rhemawave/
''; '';
@@ -96,12 +94,11 @@
echo "" echo ""
echo "Build: go build -o bin/rhemawave rhemawave.go" echo "Build: go build -o bin/rhemawave rhemawave.go"
echo "Run: ./bin/rhemawave" echo "Run: ./bin/rhemawave"
echo "Reset: ./dev_scripts/reset.sh"
''; '';
}; };
} }
)) ))
// { {
nixosModules.default = import ./nixos/module.nix self; nixosModules.default = import ./nixos/module.nix self;
nixosConfigurations.test-vm = nixpkgs.lib.nixosSystem { nixosConfigurations.test-vm = nixpkgs.lib.nixosSystem {