-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathflake.nix
More file actions
93 lines (84 loc) · 3.04 KB
/
flake.nix
File metadata and controls
93 lines (84 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
description = "CLAWDINATOR infra + Nix modules";
inputs = {
nix-openclaw.url = "github:openclaw/nix-openclaw"; # latest upstream
nixpkgs.follows = "nix-openclaw/nixpkgs";
agenix.url = "github:ryantm/agenix";
};
outputs = { self, nixpkgs, nix-openclaw, agenix }:
let
lib = nixpkgs.lib;
systems = [ "x86_64-linux" "aarch64-linux" ];
forAllSystems = f: lib.genAttrs systems (system: f system);
clawbotOverlay = nix-openclaw.overlays.default;
revisionModule = { ... }: {
system.configurationRevision =
if self ? rev then self.rev else (self.dirtyRev or null);
};
in
{
nixosModules.clawdinator = import ./nix/modules/clawdinator.nix;
nixosModules.default = self.nixosModules.clawdinator;
overlays.clawbot = clawbotOverlay;
overlays.default = clawbotOverlay;
packages = forAllSystems (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
gateway =
if pkgs ? openclaw-gateway
then pkgs.openclaw-gateway
else pkgs.openclaw;
systemPackages =
if system == "x86_64-linux" then {
clawdinator-system = self.nixosConfigurations.clawdinator-1.config.system.build.toplevel;
clawdinator-image-system = self.nixosConfigurations.clawdinator-1-image.config.system.build.toplevel;
} else {};
in {
openclaw-gateway = gateway;
default = gateway;
} // systemPackages);
nixosConfigurations.clawdinator-1 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ ... }: { nixpkgs.overlays = [ self.overlays.default ]; })
revisionModule
agenix.nixosModules.default
nix-openclaw.nixosModules.openclaw-gateway
./nix/hosts/clawdinator-1.nix
];
};
nixosConfigurations.clawdinator-2 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ ... }: { nixpkgs.overlays = [ self.overlays.default ]; })
revisionModule
agenix.nixosModules.default
nix-openclaw.nixosModules.openclaw-gateway
./nix/hosts/clawdinator-2.nix
];
};
nixosConfigurations.clawdinator-babelfish = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ ... }: { nixpkgs.overlays = [ self.overlays.default ]; })
revisionModule
agenix.nixosModules.default
nix-openclaw.nixosModules.openclaw-gateway
./nix/hosts/clawdinator-babelfish.nix
];
};
nixosConfigurations.clawdinator-1-image = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ ... }: { nixpkgs.overlays = [ self.overlays.default ]; })
revisionModule
agenix.nixosModules.default
nix-openclaw.nixosModules.openclaw-gateway
./nix/hosts/clawdinator-1-image.nix
];
};
};
}