diff --git a/flake.lock b/flake.lock index e6a6be0..53639fa 100644 --- a/flake.lock +++ b/flake.lock @@ -43,6 +43,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -85,6 +103,66 @@ "type": "github" } }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "nix-openclaw", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767909183, + "narHash": "sha256-u/bcU0xePi5bgNoRsiqSIwaGBwDilKKFTz3g0hqOBAo=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "cd6e96d56ed4b2a779ac73a1227e0bb1519b3509", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nix-openclaw": { + "inputs": { + "flake-utils": "flake-utils", + "home-manager": "home-manager_3", + "nix-steipete-tools": "nix-steipete-tools", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1773851886, + "narHash": "sha256-+3ygZuf5K8mtSGMMEZ/h+vxGvXCu1CmiB+531KMagH8=", + "owner": "openclaw", + "repo": "nix-openclaw", + "rev": "64d410666821866c565e048a4d07d6cf5d8e494e", + "type": "github" + }, + "original": { + "owner": "openclaw", + "repo": "nix-openclaw", + "type": "github" + } + }, + "nix-steipete-tools": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1773561580, + "narHash": "sha256-wT0bKTp45YnMkc4yXQvk943Zz/rksYiIjEXGdWzxnic=", + "owner": "openclaw", + "repo": "nix-steipete-tools", + "rev": "cd4c429ff3b3aaef9f92e59812cf2baf5704b86f", + "type": "github" + }, + "original": { + "owner": "openclaw", + "repo": "nix-steipete-tools", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1754028485, @@ -102,6 +180,38 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1767364772, + "narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "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_4": { "locked": { "lastModified": 1775002709, "narHash": "sha256-d3Yx83vSrN+2z/loBh4mJpyRqr9aAJqlke4TkpFmRJA=", @@ -121,7 +231,8 @@ "inputs": { "agenix": "agenix", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_2" + "nix-openclaw": "nix-openclaw", + "nixpkgs": "nixpkgs_4" } }, "systems": { @@ -138,6 +249,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 0960c7d..f4864b9 100644 --- a/flake.nix +++ b/flake.nix @@ -8,9 +8,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; agenix.url = "github:ryantm/agenix"; + nix-openclaw.url = "github:openclaw/nix-openclaw"; }; - outputs = { self, nixpkgs, home-manager, agenix, ... }: + outputs = { self, nixpkgs, home-manager, agenix, nix-openclaw, ... }: let system = "x86_64-linux"; in { @@ -20,12 +21,18 @@ modules = [ ./hosts/Nixos/configuration.nix agenix.nixosModules.default + { nixpkgs.overlays = [ nix-openclaw.overlays.default ]; } home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.backupFileExtension = "hm-bak"; - home-manager.users.ltadeu6 = import ./home/ltadeu6.nix; + home-manager.users.ltadeu6 = { + imports = [ + nix-openclaw.homeManagerModules.openclaw + ./home/ltadeu6.nix + ]; + }; } ]; }; diff --git a/home/ltadeu6.nix b/home/ltadeu6.nix index 6913fae..90f1478 100644 --- a/home/ltadeu6.nix +++ b/home/ltadeu6.nix @@ -330,5 +330,17 @@ ".config/wofi/menu.css".source = ../configs/wofi/menu.css; }; + programs.openclaw = { + documents = ../openclaw/documents; + config = { + models.providers.openai.apiKey = { + source = "env"; + provider = "default"; + id = "OPENAI_API_KEY"; + }; + }; + instances.default.enable = true; + }; + programs.home-manager.enable = true; } diff --git a/openclaw/documents/AGENTS.md b/openclaw/documents/AGENTS.md new file mode 100644 index 0000000..50a7b07 --- /dev/null +++ b/openclaw/documents/AGENTS.md @@ -0,0 +1,8 @@ +# AGENTS + +Brief rules for OpenClaw agents in this system. + +- Keep changes small and reversible. +- Avoid secrets in plain text. +- Prefer shell and CLI tools over GUI apps. +- Ask before destructive actions. diff --git a/openclaw/documents/SOUL.md b/openclaw/documents/SOUL.md new file mode 100644 index 0000000..c4bda52 --- /dev/null +++ b/openclaw/documents/SOUL.md @@ -0,0 +1,7 @@ +# SOUL + +Tone and behavior guidelines for OpenClaw. + +- Be direct and concise. +- Ask clarifying questions when needed. +- Explain tradeoffs briefly. diff --git a/openclaw/documents/TOOLS.md b/openclaw/documents/TOOLS.md new file mode 100644 index 0000000..eb31f2e --- /dev/null +++ b/openclaw/documents/TOOLS.md @@ -0,0 +1,6 @@ +# TOOLS + +Available tools and expectations. + +- Use CLI tools when possible. +- Keep output focused and actionable.