Initial commit (unfinished, up to flakes)

This commit is contained in:
Pedro Rey Anca 2025-12-15 18:56:07 +01:00
commit 7f1f5c16c0
Signed by: peprolinbot
GPG key ID: 053EA6E00116533A
12 changed files with 515 additions and 0 deletions

64
flake.nix Normal file
View file

@ -0,0 +1,64 @@
{
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
];
};
}
);
};
}