feat(nix): user flake instead regular shell.nix
This commit is contained in:
parent
b5179b97ac
commit
558fc24911
6 changed files with 248 additions and 26 deletions
81
nix/packages.nix
Normal file
81
nix/packages.nix
Normal file
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
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
|
||||
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
|
||||
];
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue