constellation/flake.nix

89 lines
2.6 KiB
Nix
Raw Normal View History

{
description = "Constellation";
inputs = {
nixpkgsUnstable = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
uplosi = {
url = "github:edgelesssys/uplosi";
inputs.nixpkgs.follows = "nixpkgsUnstable";
inputs.flake-utils.follows = "flake-utils";
};
};
outputs =
{ self
, nixpkgsUnstable
, flake-utils
, uplosi
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgsUnstable = import nixpkgsUnstable { inherit system; };
callPackage = pkgsUnstable.callPackage;
2023-10-04 04:50:42 -04:00
mkosiDev = (pkgsUnstable.mkosi.overrideAttrs (oldAttrs: rec {
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ (with pkgsUnstable; [
# package management
dnf5
rpm
createrepo_c
# filesystem tools
squashfsTools # mksquashfs
dosfstools # mkfs.vfat
mtools # mcopy
cryptsetup # dm-verity
util-linux # flock
kmod # depmod
cpio # cpio
zstd # zstd
xz # xz
# utils
gnused # sed
gnugrep # grep
]);
}));
uplosiDev = uplosi.outputs.packages."${system}".uplosi;
2023-10-04 07:17:01 -04:00
openssl-static = pkgsUnstable.openssl.override { static = true; };
2024-02-15 11:59:57 -05:00
bazel_7 = callPackage ./nix/packages/bazel.nix { pkgs = pkgsUnstable; nixpkgs = nixpkgsUnstable; };
in
{
packages.mkosi = mkosiDev;
packages.uplosi = uplosiDev;
packages.openssl = callPackage ./nix/cc/openssl.nix { pkgs = pkgsUnstable; };
packages.cryptsetup = callPackage ./nix/cc/cryptsetup.nix { pkgs = pkgsUnstable; pkgsLinux = import nixpkgsUnstable { system = "x86_64-linux"; }; };
packages.libvirt = callPackage ./nix/cc/libvirt.nix { pkgs = pkgsUnstable; pkgsLinux = import nixpkgsUnstable { system = "x86_64-linux"; }; };
2023-10-04 07:17:01 -04:00
packages.libvirtd_base = callPackage ./nix/container/libvirtd_base.nix { pkgs = pkgsUnstable; pkgsLinux = import nixpkgsUnstable { system = "x86_64-linux"; }; };
packages.vpn = callPackage ./nix/container/vpn/vpn.nix { pkgs = pkgsUnstable; pkgsLinux = import nixpkgsUnstable { system = "x86_64-linux"; }; };
2023-10-16 10:45:36 -04:00
packages.awscli2 = pkgsUnstable.awscli2;
2024-02-15 11:59:57 -05:00
packages.bazel_7 = bazel_7;
2023-10-16 10:45:36 -04:00
packages.createrepo_c = pkgsUnstable.createrepo_c;
packages.dnf5 = pkgsUnstable.dnf5;
2024-02-15 11:59:57 -05:00
devShells.default = callPackage ./nix/shells/default.nix { inherit bazel_7; };
formatter = nixpkgsUnstable.legacyPackages.${system}.nixpkgs-fmt;
});
}