add image for forgejo actions in nix

This commit is contained in:
Pim Kunis 2024-04-26 23:11:47 +02:00
parent aacf26d71e
commit 5a7cb47dd4
2 changed files with 25 additions and 0 deletions

View file

@ -18,5 +18,6 @@
outputs = { flutils, ... }@inputs: flutils.lib.meld inputs [
./blog-pim.nix
./forgejo-nix-action.nix
];
}

24
forgejo-nix-action.nix Normal file
View file

@ -0,0 +1,24 @@
{ nixpkgs, flutils, ... }: flutils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nixFromDockerHub = pkgs.dockerTools.pullImage {
imageName = "nixos/nix";
imageDigest = "sha256:b3dc72ab3216606d52357ee46f0830a0cc32f3e50e00bd490efa1a8304e9f99d";
sha256 = "sha256-FvDlbSnCmPtWTn4eG3hu8WVK1Wm3RSi2T+CdmIDLkG4=";
finalImageTag = "2.22.0";
finalImageName = "nix";
};
in
{
packages.forgejo-nix-action = pkgs.dockerTools.buildImage {
name = "forgejo-nix-action";
tag = "latest";
fromImage = nixFromDockerHub;
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ pkgs.coreutils ];
pathsToLink = [ "/bin" ];
};
};
})