diff --git a/flake.lock b/flake.lock index d4a3678..6333848 100644 --- a/flake.lock +++ b/flake.lock @@ -331,21 +331,20 @@ "flake-utils": "flake-utils_3", "home-manager": "home-manager_2", "nix-steipete-tools": "nix-steipete-tools", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1773517170, - "narHash": "sha256-KkToSYtLmzarxUIRtMPkQbjyENFAT20LOxQB4q8pya4=", + "lastModified": 1773558880, + "narHash": "sha256-hBkRVF4qzFa8GPUXe6X1hH9TmpuQhrqZUeKJZWFQwu4=", "owner": "openclaw", "repo": "nix-openclaw", - "rev": "b16bde62d32b8a853ed865379fe567e087165808", + "rev": "3d784abe7f0305a4bd1b6f5c9a5a5de213637cf3", "type": "github" }, "original": { "owner": "openclaw", "repo": "nix-openclaw", + "rev": "3d784abe7f0305a4bd1b6f5c9a5a5de213637cf3", "type": "github" } }, @@ -416,6 +415,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1767767207, + "narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5912c1772a44e31bf1c63c0390b90501e5026886", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1755186698, "narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=", @@ -431,7 +446,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1769789167, "narHash": "sha256-kKB3bqYJU5nzYeIROI82Ef9VtTbu4uA3YydSk/Bioa8=", @@ -450,7 +465,7 @@ "readlater-bot": { "inputs": { "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1772524468, @@ -478,7 +493,7 @@ "nix-darwin": "nix-darwin", "nix-homebrew": "nix-homebrew", "nix-openclaw": "nix-openclaw", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "readlater-bot": "readlater-bot" } }, diff --git a/flake.nix b/flake.nix index e9c970c..c0117c7 100644 --- a/flake.nix +++ b/flake.nix @@ -34,8 +34,7 @@ }; nix-openclaw = { - url = "github:openclaw/nix-openclaw"; - inputs.nixpkgs.follows = "nixpkgs"; + url = "github:openclaw/nix-openclaw/3d784abe7f0305a4bd1b6f5c9a5a5de213637cf3"; }; ghostty = { diff --git a/hosts/thegeneralist-central/configuration.nix b/hosts/thegeneralist-central/configuration.nix index cd162df..4bec0ca 100644 --- a/hosts/thegeneralist-central/configuration.nix +++ b/hosts/thegeneralist-central/configuration.nix @@ -86,8 +86,31 @@ { osConfig, lib, + pkgs, + inputs, ... }: + let + openclawPkgs = + let + pkgsAarch64 = import inputs.nix-openclaw.inputs.nixpkgs { system = "aarch64-linux"; }; + steipetePkgs = + if inputs.nix-openclaw.inputs.nix-steipete-tools ? packages + && builtins.hasAttr + "aarch64-linux" + inputs.nix-openclaw.inputs.nix-steipete-tools.packages + then + inputs.nix-openclaw.inputs.nix-steipete-tools.packages.aarch64-linux + else + { }; + in + import "${inputs.nix-openclaw}/nix/packages" { + pkgs = pkgsAarch64; + sourceInfo = import "${inputs.nix-openclaw}/nix/sources/openclaw-source.nix"; + inherit steipetePkgs; + }; + openclawPackage = openclawPkgs.openclaw; + in { home = { username = "thegeneralist"; @@ -97,6 +120,7 @@ programs.openclaw = { documents = ./openclaw-documents; + package = openclawPackage; config = { gateway = { mode = "local"; @@ -113,7 +137,10 @@ }; }; - instances.default.enable = true; + instances.default = { + enable = true; + package = openclawPackage; + }; }; systemd.user.services.openclaw-gateway.Service.EnvironmentFile = [ diff --git a/lib/system.nix b/lib/system.nix index 555994e..9fb0534 100644 --- a/lib/system.nix +++ b/lib/system.nix @@ -13,12 +13,18 @@ let # Collect modules from flake inputs with fallback handling collectInputModules = packagePath: let - getModule = input: - if hasAttrByPath packagePath input + getModule = name: input: + if name == "nix-openclaw" && packagePath == [ "overlays" "default" ] then + [] + else if hasAttrByPath packagePath input then [ (getAttrFromPath packagePath input) ] else []; in - concatMap getModule (attrValues inputs); + concatMap (entry: getModule entry.name entry.value) ( + mapAttrsToList (name: value: { + inherit name value; + }) inputs + ); # Collect platform-specific modules @@ -32,7 +38,7 @@ let # Collect overlays from inputs overlays = collectInputModules [ "overlays" "default" ]; - + overlayModule = { nixpkgs.overlays = overlays; };