2021-05-16 23:23:08 +03:00
|
|
|
{
|
|
|
|
inputs = {
|
2023-04-06 07:31:23 +03:00
|
|
|
html-nix.url = "git+https://git.gaze.systems/dusk/html.nix.git";
|
|
|
|
nixpkgs.follows = "html-nix/nixpkgs";
|
|
|
|
parts.follows = "html-nix/parts";
|
2021-05-16 23:23:08 +03:00
|
|
|
};
|
|
|
|
|
2023-04-06 07:31:23 +03:00
|
|
|
outputs = inputs @ {parts, ...}:
|
|
|
|
parts.lib.mkFlake {inherit inputs;} (topArgs: {
|
2022-08-14 07:17:24 +03:00
|
|
|
systems = ["x86_64-linux"];
|
2023-04-06 07:31:23 +03:00
|
|
|
imports = [inputs.html-nix.flakeModule];
|
|
|
|
perSystem = {
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
l = lib // builtins;
|
|
|
|
html-nix = config.html-nix.lib;
|
|
|
|
site = local:
|
|
|
|
html-nix.mkSiteFrom {
|
|
|
|
inherit local;
|
|
|
|
src = ./src;
|
|
|
|
config = {
|
|
|
|
baseurl = "https://gaze.systems";
|
|
|
|
title = "dusk's place";
|
|
|
|
iconPath = "resources/icon.png";
|
|
|
|
siteLang = "en";
|
2023-04-06 07:57:49 +03:00
|
|
|
descriptionsById = {
|
|
|
|
"404" = "Page not found.";
|
|
|
|
"index" = "Home page of dusk's place with information about the website.";
|
|
|
|
"posts" = "A listing of posts published on the website.";
|
|
|
|
"_exporting_ssh_key_from_gpg" = "Instructions explaining how to export SSH keys from GPG.";
|
|
|
|
};
|
2023-07-15 02:23:31 +03:00
|
|
|
footerContent = ''
|
|
|
|
<div class="bg-svg"></div>
|
|
|
|
<div class="bg-svg-fg"></div>
|
|
|
|
'';
|
2023-04-06 07:31:23 +03:00
|
|
|
};
|
|
|
|
templater = ctx:
|
|
|
|
l.pipe ctx [
|
|
|
|
topArgs.config.html-nix.lib.templaters.simple
|
|
|
|
(ctx:
|
|
|
|
l.recursiveUpdate ctx {
|
|
|
|
site."resources"."icon.png" = ./src/resources/icon.png;
|
2023-07-15 02:23:31 +03:00
|
|
|
site."resources"."wave.svg" = ./src/resources/wave.svg;
|
|
|
|
site."resources"."wavealt.svg" = ./src/resources/wave-alt.svg;
|
|
|
|
site."site.css" = ''
|
|
|
|
${ctx.site."site.css"}
|
|
|
|
|
|
|
|
.bg-svg, .bg-svg-fg {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100vw;
|
|
|
|
|
|
|
|
background-size: cover;
|
|
|
|
background-repeat: repeat-x;
|
|
|
|
}
|
|
|
|
|
|
|
|
.bg-svg {
|
|
|
|
z-index: -2;
|
|
|
|
height: 50vh;
|
|
|
|
|
|
|
|
background-image: url(resources/wave.svg);
|
|
|
|
|
|
|
|
animation: move-svg 200s linear infinite;
|
|
|
|
}
|
|
|
|
|
|
|
|
.bg-svg-fg {
|
|
|
|
z-index: -1;
|
|
|
|
height: 40vh;
|
|
|
|
|
|
|
|
background-image: url(resources/wavealt.svg);
|
|
|
|
|
|
|
|
animation: move-svg 100s linear infinite reverse;
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes move-svg {
|
|
|
|
0% {
|
|
|
|
background-position: 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
50% {
|
|
|
|
background-position: 100vw 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
100% {
|
|
|
|
background-position: 200vw 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
body {
|
|
|
|
background: #3d1f7a;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
|
|
|
color: #007fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
a.novisited:visited {
|
|
|
|
color: #007fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
a:visited {
|
|
|
|
color: #bf40bf;
|
|
|
|
}
|
|
|
|
|
|
|
|
pre,code {
|
|
|
|
background: #333;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
)
|
2023-04-06 07:31:23 +03:00
|
|
|
];
|
|
|
|
};
|
|
|
|
dev = html-nix.mkServeFromSite (site true);
|
|
|
|
in {
|
|
|
|
packages.site = html-nix.mkSitePathFrom (site false);
|
|
|
|
apps.site.program = "${dev}/bin/serve";
|
2022-08-14 07:17:24 +03:00
|
|
|
};
|
2023-04-06 07:31:23 +03:00
|
|
|
});
|
|
|
|
}
|