2023-09-04 18:45:13 +02:00
|
|
|
{
|
|
|
|
description = "Constellation";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgsUnstable = {
|
2023-11-09 20:17:14 +01:00
|
|
|
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
2023-09-04 18:45:13 +02:00
|
|
|
};
|
2024-06-04 16:50:52 +02:00
|
|
|
# TODO(msanft): Remove once https://github.com/NixOS/nixpkgs/commit/c429fa2ffa21229eeadbe37c11a47aff35f53ce0
|
|
|
|
# lands in nixpkgs-unstable.
|
|
|
|
nixpkgsBazel = {
|
|
|
|
url = "github:NixOS/nixpkgs/c429fa2ffa21229eeadbe37c11a47aff35f53ce0";
|
|
|
|
};
|
2023-09-04 18:45:13 +02:00
|
|
|
flake-utils = {
|
|
|
|
url = "github:numtide/flake-utils";
|
|
|
|
};
|
2024-01-16 11:07:15 +01:00
|
|
|
uplosi = {
|
2024-01-26 16:37:10 +01:00
|
|
|
url = "github:edgelesssys/uplosi";
|
2024-02-19 13:34:33 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
2024-01-16 11:07:15 +01:00
|
|
|
};
|
2023-09-04 18:45:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs =
|
2024-09-09 11:18:51 +02:00
|
|
|
{
|
|
|
|
self,
|
|
|
|
nixpkgsUnstable,
|
|
|
|
nixpkgsBazel,
|
|
|
|
flake-utils,
|
|
|
|
uplosi,
|
2023-09-04 18:45:13 +02:00
|
|
|
}:
|
2024-09-09 11:18:51 +02:00
|
|
|
flake-utils.lib.eachDefaultSystem (
|
|
|
|
system:
|
|
|
|
let
|
|
|
|
pkgsUnstable = import nixpkgsUnstable { inherit system; };
|
2023-09-04 18:45:13 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
bazelPkgsUnstable = import nixpkgsBazel { inherit system; };
|
2024-06-04 16:50:52 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
callPackage = pkgsUnstable.callPackage;
|
2023-11-23 17:24:54 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
mkosiDev = (
|
|
|
|
pkgsUnstable.mkosi.overrideAttrs (oldAttrs: rec {
|
|
|
|
propagatedBuildInputs =
|
|
|
|
oldAttrs.propagatedBuildInputs
|
|
|
|
++ (with pkgsUnstable; [
|
|
|
|
# package management
|
|
|
|
dnf5
|
|
|
|
rpm
|
|
|
|
createrepo_c
|
2023-09-04 18:45:13 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
# filesystem tools
|
|
|
|
squashfsTools # mksquashfs
|
|
|
|
dosfstools # mkfs.vfat
|
|
|
|
mtools # mcopy
|
|
|
|
cryptsetup # dm-verity
|
|
|
|
util-linux # flock
|
|
|
|
kmod # depmod
|
|
|
|
cpio # cpio
|
|
|
|
zstd # zstd
|
|
|
|
xz # xz
|
2024-02-16 13:10:46 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
# utils
|
|
|
|
gnused # sed
|
|
|
|
gnugrep # grep
|
|
|
|
]);
|
|
|
|
})
|
|
|
|
);
|
2023-09-04 18:45:13 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
uplosiDev = uplosi.outputs.packages."${system}".uplosi;
|
2024-01-04 16:34:15 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
openssl-static = pkgsUnstable.openssl.override { static = true; };
|
2023-10-04 13:17:01 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
bazel_7 = bazelPkgsUnstable.callPackage ./nix/packages/bazel.nix {
|
|
|
|
pkgs = bazelPkgsUnstable;
|
|
|
|
nixpkgs = nixpkgsBazel;
|
|
|
|
};
|
2024-02-15 17:59:57 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
packages.mkosi = mkosiDev;
|
2023-09-04 18:45:13 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.uplosi = uplosiDev;
|
2024-01-04 16:34:15 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.openssl = callPackage ./nix/cc/openssl.nix { pkgs = pkgsUnstable; };
|
2023-11-23 17:24:54 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.cryptsetup = callPackage ./nix/cc/cryptsetup.nix {
|
|
|
|
pkgs = pkgsUnstable;
|
|
|
|
pkgsLinux = import nixpkgsUnstable { system = "x86_64-linux"; };
|
|
|
|
};
|
2023-11-23 17:24:54 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.libvirt = callPackage ./nix/cc/libvirt.nix {
|
|
|
|
pkgs = pkgsUnstable;
|
|
|
|
pkgsLinux = import nixpkgsUnstable { system = "x86_64-linux"; };
|
|
|
|
};
|
2023-10-04 13:17:01 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.libvirtd_base = callPackage ./nix/container/libvirtd_base.nix {
|
|
|
|
pkgs = pkgsUnstable;
|
|
|
|
pkgsLinux = import nixpkgsUnstable { system = "x86_64-linux"; };
|
|
|
|
};
|
2023-11-28 10:52:37 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.vpn = callPackage ./nix/container/vpn/vpn.nix {
|
|
|
|
pkgs = pkgsUnstable;
|
|
|
|
pkgsLinux = import nixpkgsUnstable { system = "x86_64-linux"; };
|
|
|
|
};
|
2024-02-15 13:08:27 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.awscli2 = pkgsUnstable.awscli2;
|
2023-10-16 16:45:36 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.bazel_7 = bazel_7;
|
2023-11-03 11:41:45 +01:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.createrepo_c = pkgsUnstable.createrepo_c;
|
2023-10-16 16:45:36 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
packages.dnf5 = pkgsUnstable.dnf5;
|
2023-10-16 16:45:36 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
devShells.default = callPackage ./nix/shells/default.nix { inherit bazel_7; };
|
2023-09-04 18:45:13 +02:00
|
|
|
|
2024-09-09 11:18:51 +02:00
|
|
|
formatter = nixpkgsUnstable.legacyPackages.${system}.nixpkgs-fmt;
|
|
|
|
}
|
|
|
|
);
|
2023-09-04 18:45:13 +02:00
|
|
|
}
|