Skip to content

Commit

Permalink
Fix network-online (#55)
Browse files Browse the repository at this point in the history
* Fix network-online

* Fix new image build

* Update flake lock to point to master. Fixes repart build

* fix test
  • Loading branch information
arianvp authored Feb 4, 2024
1 parent e35e556 commit 40230a4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@8a218f9e264e9c3803c9a1ee1c30d8e4ab55be63 # v2
- run: nix build .#amazonImage -L --system ${{ matrix.runs-on.system }}
- run: nix flake check -L --system ${{ matrix.runs-on.system }}
if: ${{ matrix.runs-on.system != 'aarch64-linux' }}
7 changes: 3 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "A very basic flake";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:NixOS/nixpkgs";
};

outputs = { self, nixpkgs, ... }:
Expand Down
4 changes: 2 additions & 2 deletions modules/amazon-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ in
pkgs.runCommand config.system.build.image.name { } ''
mkdir -p $out
mkdir -p $out/nix-support
${pkgs.qemu-utils}/bin/qemu-img convert -f raw -O vpc ${config.system.build.image}/image.raw $out/image.vhd
${pkgs.qemu-utils}/bin/qemu-img convert -f raw -O vpc ${config.system.build.image}/${config.image.repart.imageFile} $out/${config.image.repart.imageFileBasename}.vhd
cat <<EOF > $out/nix-support/image-info.json
{
"boot_mode": "uefi",
"label": "${config.system.nixos.label}",
"system": "${pkgs.stdenv.hostPlatform.system}",
"file": "$out/image.vhd"
"file": "$out/${config.image.repart.imageFileBasename}.vhd"
}
EOF
'';
Expand Down
1 change: 1 addition & 0 deletions modules/amazon-profile.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

systemd.services.ec2-metadata = {
description = "Fetch EC2 metadata and set up ssh keys for ec2-user";
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];

Expand Down
2 changes: 1 addition & 1 deletion tests/resize-partition.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"-f",
"qcow2",
"-b",
"${nodes.machine.system.build.image}/image.raw",
"${nodes.machine.system.build.image}/${nodes.machine.image.repart.imageFile}",
"-F",
"raw",
tmp_disk_image.name,
Expand Down

0 comments on commit 40230a4

Please sign in to comment.