melodypond/flake.nix

57 lines
1.4 KiB
Nix

{
description = "my project description";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
colmena.url = "github:zhaofengli/colmena";
graphfix.url = "sourcehut:~mtxyz/graphfix";
graphfix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{self, nixpkgs, flake-utils, ...}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
inputs.graphfix.overlay
inputs.colmena.overlay
];
};
clementine = nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = [
./citrus.nix
./platforms/clementine.nix
];
};
in rec {
devShell = pkgs.mkShell {
packages = with pkgs; [ colmena ];
};
packages.default = clementine.config.system.build.vm;
}) // (let
pkgs = import nixpkgs {
system = "aarch64-linux";
overlays = [ inputs.graphfix.overlay ];
};
modules = [
./citrus.nix
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./platforms/orange.nix
];
in {
colmena = {
meta.nixpkgs = pkgs;
orange = {
imports = modules;
};
};
orange = (nixpkgs.lib.nixosSystem {
inherit pkgs modules;
}).config.system.build.sdImage;
});
}