Browse Source

Make minor adjustments to lib.nix

master
Danila Fedorin 10 months ago
parent
commit
853dcaac4b
  1. 12
      lib.nix

12
lib.nix

@ -31,25 +31,25 @@ let
};
wrapHost = ssl: host: (if ssl then "https" else "http") + "//${host}";
in
lib = {
{
english = settings: website {
inherit (settings) drafts;
ssl = settings.ssl or false;
drafts = settings.drafts or false;
source = blog-source;
path = ".";
replaceUrl = {
from = "https://danilafe.com";
to = wrapHost settings.ssl settings.host;
to = wrapHost (settings.ssl or false) settings.host;
};
};
russian = settings: website {
inherit (settings) drafts;
ssl = settings.ssl or false;
drafts = settings.drafts or false;
source = blog-source-localized;
path = "ru";
replaceUrl = {
from = "https://ru.danilafe.com";
to = wrapHost settings.ssl settings.host;
to = wrapHost (settings.ssl or false) settings.host;
};
};
};
}

Loading…
Cancel
Save