patos/flake.nix

66 lines
1.6 KiB
Nix
Raw Normal View History

2024-09-12 21:57:01 +02:00
{
description = "PatOS is a minimal, immutable Linux distribution specialized for the Patagia Platform.";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2024-09-12 21:57:01 +02:00
};
2024-09-17 23:02:53 +02:00
outputs =
{
self,
flake-utils,
nixpkgs,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
2025-02-20 10:40:53 +01:00
patosPkgs = self.packages.${system};
2025-02-25 23:08:42 +01:00
version = "0.0.1";
in
{
packages = {
2025-02-25 23:08:42 +01:00
default = patosPkgs.image;
image = pkgs.callPackage ./image {
inherit patosPkgs;
inherit version;
};
rootfs = pkgs.callPackage ./rootfs {
inherit patosPkgs;
inherit version;
};
initrd = pkgs.callPackage ./rootfs/mkinitrd.nix {
inherit patosPkgs;
inherit version;
};
kernel = pkgs.callPackage ./kernel { };
glibc = pkgs.callPackage ./glibc { };
systemd = pkgs.callPackage ./systemd { };
2025-02-20 10:40:53 +01:00
dbus-broker = pkgs.callPackage ./dbus-broker { };
2025-02-20 10:40:53 +01:00
qemu-uefi-tpm = pkgs.callPackage ./utils/qemu-uefi-tpm.nix { };
};
checks = {
simple-test = pkgs.runCommand "simple-test" { } ''
${self.packages.${system}.default}/bin/my-program
touch $out
'';
};
formatter = pkgs.nixpkgs-fmt;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
just
nixd
nixfmt-rfc-style
2025-02-25 23:08:42 +01:00
patosPkgs.qemu-uefi-tpm
];
};
}
);
2024-09-12 21:57:01 +02:00
}