From 290904177f9f5dc131b605304e52f791fc26b65f Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Sun, 21 Apr 2024 17:05:46 +0200 Subject: [PATCH] Fix --- .github/workflows/ami.yml | 5 +++-- modules/amazon-image.nix | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ami.yml b/.github/workflows/ami.yml index b727995..ce4c784 100644 --- a/.github/workflows/ami.yml +++ b/.github/workflows/ami.yml @@ -18,7 +18,8 @@ jobs: aws-region: eu-north-1 role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/upload-ami - run: nix build ${{ env.FLAKE_REF }}#legacyAmazonImage - - run: file="$(jq '.file' < ./result/nix-support/image-info.json)" - - run: nix run --inputs-from ${{ env.FLAKE_REF }} nixpkgs#coldsnap -- upload --no-progress "$file" + - run: | + file="$(jq '.file' < ./result/nix-support/image-info.json)" + nix run --inputs-from ${{ env.FLAKE_REF }} nixpkgs#coldsnap -- upload --no-progress "$file" diff --git a/modules/amazon-image.nix b/modules/amazon-image.nix index aec19b0..44e36e7 100644 --- a/modules/amazon-image.nix +++ b/modules/amazon-image.nix @@ -19,12 +19,13 @@ in "format": "raw", "label": "${config.system.nixos.label}", "system": "${pkgs.stdenv.hostPlatform.system}", - "file": "${config.image.repart.imageFile}" + "file": "${config.system.build.image}/${config.image.repart.imageFile}" } EOF ''; - image.repart.name = "${config.system.nixos.distroId}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; + image.repart.name = config.system.nixos.distroId; + image.repart.version = config.system.nixos.version; image.repart.partitions = { "00-esp" = { contents = {