Commit 68b676c993bf

Vincent Demeester <vincent@sbr.pm>
2026-02-16 16:13:48
Add flake.nix with package and NixOS module
Exports: packages.x86_64-linux.daneel - the bot binary nixosModules.daneel - NixOS service module Usage in consumer flake: inputs.daneel.url = "github:vdemeester/daneel"; # or codeberg: inputs.daneel.url = "git+https://codeberg.org/vdemeester/daneel.git"; nixosModules = [ inputs.daneel.nixosModules.daneel ]; services.daneel = { enable = true; xmppJid = "researchbot@xmpp.sbr.pm"; ... };
Changed files (2)
flake.lock
@@ -0,0 +1,27 @@
+{
+  "nodes": {
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1771008912,
+        "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "a82ccc39b39b621151d6732718e3e250109076fa",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-unstable",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "root": {
+      "inputs": {
+        "nixpkgs": "nixpkgs"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
flake.nix
@@ -0,0 +1,34 @@
+{
+  description = "Daneel - XMPP research bot using Pi AI toolkit";
+
+  inputs = {
+    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+  };
+
+  outputs =
+    { self, nixpkgs }:
+    let
+      supportedSystems = [
+        "x86_64-linux"
+        "aarch64-linux"
+      ];
+      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
+    in
+    {
+      packages = forAllSystems (
+        system:
+        let
+          pkgs = nixpkgs.legacyPackages.${system};
+        in
+        {
+          daneel = pkgs.callPackage ./nix/package.nix { };
+          default = self.packages.${system}.daneel;
+        }
+      );
+
+      nixosModules = {
+        daneel = import ./nix/module.nix;
+        default = self.nixosModules.daneel;
+      };
+    };
+}