Files
ci-images/flake.nix
T

49 lines
1.2 KiB
Nix
Raw Normal View History

2024-04-16 11:56:30 -05:00
{
description = "Standard images that Greg wants to build";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
greg.url = "github:greg-hellings/nixos-config";
};
outputs = inputs@{ self, nixpkgs, flake-utils, greg, flake-parts }:
flake-parts.lib.mkFlake { inherit inputs; } {
flake = {
};
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem = sys@{ config, pkgs, system, ... }: {
_module.args.pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
packages = {
2024-04-16 13:01:12 -05:00
vm-test = let
2024-04-16 14:13:24 -05:00
basicPython = (pkgs.python3.withPackages (p: with p; [ pyyaml ]));
2024-04-16 13:01:12 -05:00
in pkgs.dockerTools.buildLayeredImage {
2024-04-16 11:56:30 -05:00
name = "vm-test";
2024-04-16 12:20:55 -05:00
tag = "latest";
2024-04-16 11:56:30 -05:00
contents = with pkgs; [
bash
2024-04-16 12:55:52 -05:00
coreutils
2024-04-16 11:56:30 -05:00
curl
2024-04-16 12:56:43 -05:00
gnugrep
2024-04-16 11:56:30 -05:00
findutils
jq
packer
shellcheck
2024-04-16 14:13:24 -05:00
(xonsh.overridePythonAttrs (old: rec { python3 = basicPython; propagatedBuildInputs = old.propagatedBuildInputs ++ [ basicPython.pkgs.pyyaml ];}))
2024-04-16 11:56:30 -05:00
];
2024-04-16 14:53:04 -05:00
extraCommands = [
"mkdir -p /tmp"
];
2024-04-16 11:56:30 -05:00
};
};
};
};
}