Add and apply the Jost sans-serif font.
This commit is contained in:
parent
64b5520170
commit
0bdea738d7
21 changed files with 102 additions and 6 deletions
|
|
@ -25,6 +25,14 @@
|
|||
mkdir -p $out/fonts
|
||||
cp "$f" $out/fonts/MapleMonoNerd.ttf
|
||||
'';
|
||||
|
||||
# Package local Jost OTF files from the repository into the Nix store so
|
||||
# they can be installed into the Forgejo custom assets directory.
|
||||
jostFonts = pkgs.runCommand "jost-fonts" { } ''
|
||||
mkdir -p $out/fonts
|
||||
# copy all OpenType files from the repository styling folder
|
||||
cp -a ${toString ../styling/forgejo/Jost/OpenType}/*.otf $out/fonts/ || true
|
||||
'';
|
||||
in {
|
||||
options.local = {
|
||||
hostname = lib.mkOption {
|
||||
|
|
@ -139,13 +147,13 @@ in {
|
|||
"d '${config.services.forgejo.customDir}/public/assets/css' - forgejo forgejo - -"
|
||||
# install the TTF from the Nix store into the Forgejo customDir
|
||||
"C+ '${config.services.forgejo.customDir}/public/assets/fonts/MapleMonoNerd.ttf' - forgejo forgejo - ${mapleFonts}/fonts/MapleMonoNerd.ttf"
|
||||
"C+ '${config.services.forgejo.customDir}/templates/home.tmpl' - forgejo forgejo - ${
|
||||
../styling/forgejo/home.tmpl
|
||||
}"
|
||||
#"C+ '${config.services.forgejo.customDir}/templates/home.tmpl' - forgejo forgejo - ${
|
||||
# ../styling/forgejo/home.tmpl
|
||||
#}"
|
||||
# copy header.tmpl into templates/custom so we can inject custom CSS into the <head>
|
||||
"C+ '${config.services.forgejo.customDir}/templates/custom/header.tmpl' - forgejo forgejo - ${
|
||||
../styling/forgejo/header.tmpl
|
||||
}"
|
||||
#"C+ '${config.services.forgejo.customDir}/templates/custom/header.tmpl' - forgejo forgejo - ${
|
||||
# ../styling/forgejo/header.tmpl
|
||||
#}"
|
||||
# copy your theme CSS into the public assets so Forgejo serves it directly
|
||||
"C+ '${config.services.forgejo.customDir}/public/assets/css/theme-custom.css' - forgejo forgejo - ${
|
||||
../styling/forgejo/theme-custom.css
|
||||
|
|
@ -167,6 +175,7 @@ in {
|
|||
cp -a ${toString ../styling/forgejo/header.tmpl} ${config.services.forgejo.customDir}/templates/custom/header.tmpl; \
|
||||
cp -a ${toString ../styling/forgejo/home.tmpl} ${config.services.forgejo.customDir}/templates/home.tmpl; \
|
||||
cp -a ${toString ../styling/forgejo/theme-custom.css} ${config.services.forgejo.customDir}/public/assets/css/theme-custom.css; \
|
||||
cp -a ${jostFonts}/fonts/* ${config.services.forgejo.customDir}/public/assets/fonts/ || true; \
|
||||
chown -R forgejo:forgejo ${config.services.forgejo.customDir}"'';
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue