patos/flake.nix
Daniel Lundin b784c94d42
Some checks are pending
ci/woodpecker/pr/ci Pipeline is pending
WIP: Build image from scratch / without NixOS.
An experiment to see if we can minimize the PatOS project even further,
and not have to adapt NixOS packages and config for our needs.
2025-02-14 13:07:01 +01:00

52 lines
1.2 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; };
in
{
packages = {
default = self.packages.${system}.image;
image = pkgs.writeShellScriptBin "image" ''
echo "make image here..."
'';
kernel = pkgs.callPackage ./kernel { };
systemd = pkgs.callPackage ./systemd { };
};
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; [
erofs-utils
just
nixd
nixfmt-rfc-style
squashfs-tools-ng
];
};
}
);
}