summary refs log tree commit diff
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-06-16 20:50:58 +0200
committerMel <mel@rnrd.eu>2026-06-16 20:54:07 +0200
commit3c736fab4e673f99b58ec71b11690b12396985bb (patch)
tree093bc3b187adc17e15794f77c400aa305ad4624f
parent03f0fd06c17f5d58993b146ccc9109f9344e7218 (diff)
downloadnetwork-3c736fab4e673f99b58ec71b11690b12396985bb.tar.zst
network-3c736fab4e673f99b58ec71b11690b12396985bb.zip
Add tools, user to agent, clean-up flake input
Signed-off-by: Mel <mel@rnrd.eu>
-rw-r--r--flake.lock44
-rw-r--r--flake.nix5
-rw-r--r--modules/agent.nix52
3 files changed, 70 insertions, 31 deletions
diff --git a/flake.lock b/flake.lock
index 26da37a..5708004 100644
--- a/flake.lock
+++ b/flake.lock
@@ -110,18 +110,20 @@
     "hermes-agent": {
       "inputs": {
         "flake-parts": "flake-parts",
-        "nixpkgs": "nixpkgs",
+        "nixpkgs": [
+          "nixpkgs-unstable"
+        ],
         "npm-lockfile-fix": "npm-lockfile-fix",
         "pyproject-build-systems": "pyproject-build-systems",
         "pyproject-nix": "pyproject-nix_2",
         "uv2nix": "uv2nix_2"
       },
       "locked": {
-        "lastModified": 1781361238,
-        "narHash": "sha256-BcosUFspfB2aCZ6FyeURiwjR28uaPeOv6oaz+aEkBS8=",
+        "lastModified": 1781634515,
+        "narHash": "sha256-AHLycvlLoww1gs2yI49iBmkA234G0z+EUo+Y8vYftDM=",
         "owner": "NousResearch",
         "repo": "hermes-agent",
-        "rev": "cc14b74718aaab8f3dc69c004b4dccf67077a1e1",
+        "rev": "6ebc4499150b78a983054c01dcfa31f78a677314",
         "type": "github"
       },
       "original": {
@@ -153,7 +155,7 @@
     },
     "nixos-hardware": {
       "inputs": {
-        "nixpkgs": "nixpkgs_2"
+        "nixpkgs": "nixpkgs"
       },
       "locked": {
         "lastModified": 1781168557,
@@ -171,18 +173,15 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1775036866,
-        "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
-        "type": "github"
+        "lastModified": 1767892417,
+        "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
+        "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
+        "type": "tarball",
+        "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
       },
       "original": {
-        "owner": "NixOS",
-        "ref": "nixos-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
+        "type": "tarball",
+        "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
       }
     },
     "nixpkgs-unstable": {
@@ -203,19 +202,6 @@
     },
     "nixpkgs_2": {
       "locked": {
-        "lastModified": 1767892417,
-        "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
-        "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
-        "type": "tarball",
-        "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
-      },
-      "original": {
-        "type": "tarball",
-        "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
-      }
-    },
-    "nixpkgs_3": {
-      "locked": {
         "lastModified": 1780952837,
         "narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=",
         "owner": "NixOS",
@@ -364,7 +350,7 @@
         "hermes-agent": "hermes-agent",
         "home-manager": "home-manager",
         "nixos-hardware": "nixos-hardware",
-        "nixpkgs": "nixpkgs_3",
+        "nixpkgs": "nixpkgs_2",
         "nixpkgs-unstable": "nixpkgs-unstable",
         "oisd": "oisd"
       }
diff --git a/flake.nix b/flake.nix
index 6ba03f3..c52d5d8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -35,7 +35,10 @@
       flake = false;
     };
 
-    hermes-agent.url = "github:NousResearch/hermes-agent";
+    hermes-agent = {
+      url = "github:NousResearch/hermes-agent";
+      inputs.nixpkgs.follows = "nixpkgs-unstable";
+    };
   };
 
   outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, agenix, ... }:
diff --git a/modules/agent.nix b/modules/agent.nix
index aabbfc3..880919b 100644
--- a/modules/agent.nix
+++ b/modules/agent.nix
@@ -1,4 +1,4 @@
-{ config, hermes-agent, ... }:
+{ config, pkgs, hermes-agent, ... }:
 
 {
   imports = [
@@ -12,6 +12,15 @@
     mode = "0440";
   };
 
+  users.groups.renard = { };
+  users.users.renard = {
+    isSystemUser = true;
+    group = "renard";
+    home = "/home/renard";
+    createHome = true;
+    shell = pkgs.bashInteractive;
+  };
+
   services.hermes-agent = {
     enable = true;
 
@@ -20,9 +29,50 @@
     user = "renard";
     group = "renard";
     stateDir = "/home/renard";
+    createUser = false;
 
     extraDependencyGroups = [ "messaging" ];
 
+    # packages for the agent to work with.
+    # it should also always be able to call `nix-shell` to gain access to more tools.
+    extraPackages = with pkgs; [
+      nix
+      nixfmt-rfc-style
+
+      openssh
+      tailscale
+
+      docker_29
+
+      jq
+      yq-go
+      ripgrep
+      fd
+      tree
+      file
+      unzip
+      gnused
+      gawk
+
+      curl
+      wget
+
+      htop
+      glances
+      lsof
+      iproute2
+      iputils
+      inetutils
+
+      dig
+      tcpdump
+      nmap
+
+      git
+
+      vim
+    ];
+
     environmentFiles = [
       # required secrets:
       # * OPENROUTER_API_KEY