add zstd tools to the base flake actions image to be able to run standard nix community actions
This commit is contained in:
parent
96f5f85a20
commit
09fcbbb6ee
2 changed files with 86 additions and 85 deletions
10
README.md
10
README.md
|
@ -1,6 +1,8 @@
|
||||||
* `nix build '.#flakes-action' #for default platform
|
* `nix build '.#flakes-action' #for default platform
|
||||||
* nix build '#packages.aarch64-linux.flakes-action' #for specific platform
|
* nix build '#packages.aarch64-linux.flakes-action' #for specific platform
|
||||||
* `docker load < result`
|
*
|
||||||
* `docker tag [image id] git.cyplo.dev/cyplo/base-images/flakes-action:latest`
|
```
|
||||||
* `docker push git.cyplo.dev/cyplo/base-images/flakes-action:latest`
|
export BASE_IMAGE_DOCKER_TAG=`docker load < result | grep -i 'loaded image' | cut -f3 -d ' '`
|
||||||
|
docker tag $BASE_IMAGE_DOCKER_TAG git.cyplo.dev/cyplo/base-images/flakes-action:latest
|
||||||
|
docker push git.cyplo.dev/cyplo/base-images/flakes-action:latest
|
||||||
|
```
|
||||||
|
|
41
flake.nix
41
flake.nix
|
@ -6,21 +6,22 @@
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem
|
flake-utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system: let
|
||||||
let
|
pkgs = import nixpkgs {inherit system;};
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
pkgsStatic = pkgs.pkgsStatic;
|
pkgsStatic = pkgs.pkgsStatic;
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
packages = {
|
packages = {
|
||||||
hello = pkgs.dockerTools.buildImage {
|
hello = pkgs.dockerTools.buildImage {
|
||||||
name = "hello-docker";
|
name = "hello-docker";
|
||||||
config = {
|
config = {
|
||||||
Cmd = [ "${pkgs.hello}/bin/hello" ];
|
Cmd = ["${pkgs.hello}/bin/hello"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
flakes-action = pkgs.dockerTools.buildImageWithNixDb {
|
flakes-action = pkgs.dockerTools.buildImageWithNixDb {
|
||||||
|
@ -28,21 +29,22 @@
|
||||||
contents = with pkgs; [
|
contents = with pkgs; [
|
||||||
./root
|
./root
|
||||||
bash
|
bash
|
||||||
|
cacert
|
||||||
coreutils
|
coreutils
|
||||||
curl
|
curl
|
||||||
gawk
|
gawk
|
||||||
gitFull
|
gitFull
|
||||||
git-lfs
|
git-lfs
|
||||||
gnused
|
gnused
|
||||||
nodejs
|
|
||||||
wget
|
|
||||||
sudo
|
|
||||||
nixFlakes
|
|
||||||
cacert
|
|
||||||
gnutar
|
gnutar
|
||||||
gzip
|
gzip
|
||||||
|
nixFlakes
|
||||||
|
nodejs
|
||||||
openssh
|
openssh
|
||||||
|
sudo
|
||||||
|
wget
|
||||||
xz
|
xz
|
||||||
|
zstd
|
||||||
(pkgs.writeTextFile {
|
(pkgs.writeTextFile {
|
||||||
name = "nix.conf";
|
name = "nix.conf";
|
||||||
destination = "/etc/nix/nix.conf";
|
destination = "/etc/nix/nix.conf";
|
||||||
|
@ -65,7 +67,7 @@
|
||||||
mkdir -vp root
|
mkdir -vp root
|
||||||
'';
|
'';
|
||||||
config = {
|
config = {
|
||||||
Cmd = [ "/bin/bash" ];
|
Cmd = ["/bin/bash"];
|
||||||
Env = [
|
Env = [
|
||||||
"LANG=en_GB.UTF-8"
|
"LANG=en_GB.UTF-8"
|
||||||
"ENV=/etc/profile.d/nix.sh"
|
"ENV=/etc/profile.d/nix.sh"
|
||||||
|
@ -82,14 +84,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells = {
|
devShells = {
|
||||||
default = (pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
buildInputs = (with pkgs;
|
buildInputs = with pkgs; [
|
||||||
[
|
|
||||||
git-lfs
|
git-lfs
|
||||||
]);
|
];
|
||||||
|
};
|
||||||
});
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue