Make minor adjustments to lib.nix
This commit is contained in:
parent
30bd041431
commit
853dcaac4b
12
lib.nix
12
lib.nix
|
@ -31,25 +31,25 @@ let
|
||||||
};
|
};
|
||||||
wrapHost = ssl: host: (if ssl then "https" else "http") + "//${host}";
|
wrapHost = ssl: host: (if ssl then "https" else "http") + "//${host}";
|
||||||
in
|
in
|
||||||
lib = {
|
{
|
||||||
english = settings: website {
|
english = settings: website {
|
||||||
inherit (settings) drafts;
|
|
||||||
ssl = settings.ssl or false;
|
ssl = settings.ssl or false;
|
||||||
|
drafts = settings.drafts or false;
|
||||||
source = blog-source;
|
source = blog-source;
|
||||||
path = ".";
|
path = ".";
|
||||||
replaceUrl = {
|
replaceUrl = {
|
||||||
from = "https://danilafe.com";
|
from = "https://danilafe.com";
|
||||||
to = wrapHost settings.ssl settings.host;
|
to = wrapHost (settings.ssl or false) settings.host;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
russian = settings: website {
|
russian = settings: website {
|
||||||
inherit (settings) drafts;
|
|
||||||
ssl = settings.ssl or false;
|
ssl = settings.ssl or false;
|
||||||
|
drafts = settings.drafts or false;
|
||||||
source = blog-source-localized;
|
source = blog-source-localized;
|
||||||
path = "ru";
|
path = "ru";
|
||||||
replaceUrl = {
|
replaceUrl = {
|
||||||
from = "https://ru.danilafe.com";
|
from = "https://ru.danilafe.com";
|
||||||
to = wrapHost settings.ssl settings.host;
|
to = wrapHost (settings.ssl or false) settings.host;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user