Initial commit (unfinished, up to flakes)
This commit is contained in:
commit
7f1f5c16c0
12 changed files with 515 additions and 0 deletions
64
flake.nix
Normal file
64
flake.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue