69 lines
1.9 KiB
Nix
69 lines
1.9 KiB
Nix
{
|
|
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";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
flake-utils,
|
|
nixpkgs,
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
patosPkgs = self.packages.${system};
|
|
version = "0.0.1";
|
|
in
|
|
{
|
|
packages = {
|
|
default = patosPkgs.image;
|
|
image = pkgs.callPackage ./pkgs/image {
|
|
inherit patosPkgs;
|
|
inherit version;
|
|
};
|
|
rootfs = pkgs.callPackage ./pkgs/rootfs {
|
|
inherit patosPkgs;
|
|
inherit version;
|
|
};
|
|
initrd = pkgs.callPackage ./pkgs/rootfs/mkinitrd.nix {
|
|
inherit patosPkgs;
|
|
inherit version;
|
|
};
|
|
kernel = pkgs.callPackage ./pkgs/kernel { };
|
|
glibc = pkgs.callPackage ./pkgs/glibc { };
|
|
kexec = pkgs.callPackage ./pkgs/kexec-tools { };
|
|
lvm2 = pkgs.callPackage ./pkgs/lvm2 { };
|
|
tpm2-tools = pkgs.callPackage ./pkgs/tpm2-tools { inherit patosPkgs; };
|
|
tpm2-tss = pkgs.callPackage ./pkgs/tpm2-tss { };
|
|
systemd = pkgs.callPackage ./pkgs/systemd { };
|
|
dbus-broker = pkgs.callPackage ./pkgs/dbus-broker { };
|
|
|
|
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
|
|
patosPkgs.qemu-uefi-tpm
|
|
];
|
|
};
|
|
|
|
}
|
|
);
|
|
}
|