charla-gpul-nixos/flake.nix

64 lines
1.4 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
};
outputs = {
self,
nixpkgs,
}: let
supportedSystems = [
"x86_64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
in {
packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
src = ./src;
slides = "${src}/slides.md";
presenterm_config = ./presenterm_config.yaml;
in rec {
run-presentation = pkgs.writeShellApplication {
name = "run-presentation";
runtimeInputs = with pkgs; [
presenterm
nix # For snippet execution
];
text = ''
presenterm -x ${slides} -c ${presenterm_config}
'';
};
run-presentation-kitty = pkgs.writeShellApplication {
name = "run-presentation-kitty";
runtimeInputs = [
run-presentation
pkgs.kitty
];
text = ''
kitty --config=NONE run-presentation
'';
};
});
devShells = forAllSystems (
system: let
pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
presenterm
python3Packages.weasyprint
markdown-oxide
];
};
}
);
};
}