Skip to content

Commit 3fa00da

Browse files
fix(cloud): use root tofu flake and nixpkgs amazon image
1 parent 902505b commit 3fa00da

File tree

5 files changed

+12
-54
lines changed

5 files changed

+12
-54
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ versioning is done in a continuous fashion without worries of breaking changes.
77
## patches
88

99
- `openclaw`: bring tom to slack in persistent http connection kept 2026-04-05
10+
- `cloud`: route tofu through root flake and nixpkgs image path 2026-04-05
1011
- `systemd`: protect against services finding another other process 2026-04-04
1112
- `nix`: import language servers and formatted linter from upstream 2026-04-04
1213
- `vhs`: record terminal demos with tapes that share in caring gifs 2026-03-30

cloud/cloud.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ function help {
1212

1313
# Update infrastructure with any state changes
1414
function apply {
15-
nix run .# apply
15+
nix run ..#tofu -- apply
1616
}
1717

1818
# Ensure formatting matches a statand
1919
function check {
20-
nix run .# fmt -check
21-
nix run .# validate
20+
nix run ..#tofu -- fmt -check
21+
nix run ..#tofu -- validate
2222
}
2323

2424
# Reset back to a clean directory
@@ -33,12 +33,12 @@ function clean {
3333
# Setup the current state
3434
function init {
3535
rm -f terraform.tfstate terraform.tfstate.backup
36-
nix run .# init
36+
nix run ..#tofu -- init
3737
}
3838

3939
# Preview any changes to the configurations
4040
function plan {
41-
nix run .# plan
41+
nix run ..#tofu -- plan
4242
}
4343

4444
# Hint if no command is provided

cloud/configuration.nix

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"x86_64-linux" =
44
let
55
system = "x86_64-linux";
6-
pkgs = import nixpkgs {
7-
inherit system;
8-
};
6+
pkgs = nixpkgs.legacyPackages.${system};
97
configurations =
108
{ config, ... }:
119
{
@@ -220,17 +218,18 @@
220218
};
221219
};
222220
name = "web-${system}";
223-
image = inputs.nixos-generators.nixosGenerate {
224-
inherit pkgs;
225-
format = "amazon";
221+
imageCfg = nixpkgs.lib.nixosSystem {
222+
inherit system;
226223
modules = [
227224
configurations
225+
"${nixpkgs}/nixos/maintainers/scripts/ec2/amazon-image.nix"
228226
{
229227
image.baseName = name;
230228
}
231229
];
232230
};
233-
virtualization = "${image}/${name}.vhd";
231+
image = imageCfg.config.system.build.amazonImage;
232+
virtualization = "${image}/${imageCfg.config.image.fileName}";
234233
in
235234
{
236235
tofu = pkgs.writeShellScriptBin "tofu" ''

flake.lock

Lines changed: 0 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
url = "github:openclaw/nix-openclaw";
2525
inputs.nixpkgs.follows = "nixpkgs";
2626
};
27-
nixos-generators = {
28-
url = "github:nix-community/nixos-generators";
29-
inputs.nixpkgs.follows = "nixpkgs";
30-
};
3127
nixpkgs = {
3228
url = "github:NixOS/nixpkgs/nixos-unstable";
3329
};
@@ -72,7 +68,6 @@
7268
});
7369
packages = import ./cloud/configuration.nix {
7470
inherit nixpkgs self;
75-
inherit (inputs) nixos-generators;
7671
};
7772
darwinConfigurations = {
7873
edenzim-ltmbn8v.internal.salesforce.com = inputs.nix-darwin.lib.darwinSystem {

0 commit comments

Comments
 (0)