cours/nix/packages.nix

82 lines
2.1 KiB
Nix

{
lib,
inputs,
...
}:
let
inherit (lib) mkOption mdDoc types;
inherit (inputs.flake-parts.lib) mkPerSystemOption;
in
{
options.perSystem = mkPerSystemOption (
{
pkgs,
config,
...
}:
{
options = {
latexBuildPackages = mkOption {
description = mdDoc "Packages needed to build latex file";
type = types.listOf types.package;
default = with pkgs; [
(pkgs.texlive.combine {
inherit (pkgs.texlive)
babel-french
caption
collection-luatex
float
fontawesome
fontspec
lato
libertine
listings
lstfiracode
calrsfs
pdfpages
pdflscape
scheme-basic
soul
titlesec
xcolor
;
})
fira-code
];
};
hugoBuildPackages = mkOption {
description = mdDoc "Packages needed to build latex file";
type = types.listOf types.package;
default = with pkgs; [
hugo
];
};
themePackage = mkOption {
description = mdDoc "Theme user for my course note";
default = pkgs.stdenvNoCC.mkDerivation {
name = "hugo-theme-mainroad";
pname = "hugo-theme-mainroad";
src = pkgs.fetchFromGitHub {
owner = "vimux";
repo = "mainroad";
rev = "13e04b3694ea2d20a68cfbfaea42a8c565079809";
sha256 = "sha256-td8xQhAz/TnjZmOKIEiQjRgzdoicRrVN9h41Uxnnaso=";
};
installPhase = ''
cp -r $src $out
'';
};
};
develPackages = mkOption {
description = mdDoc "Python package used to development";
type = types.listOf types.package;
default = with pkgs; [
convco
go-task
];
};
};
});
}