guh
This commit is contained in:
parent
3f0caa133a
commit
daaaa5bd05
@ -25,11 +25,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1659159625,
|
||||
"narHash": "sha256-TElL1iaIY/xrIX+JYsppKWa510R8aJDXWQJxjpyCVxo=",
|
||||
"lastModified": 1659180517,
|
||||
"narHash": "sha256-JHgu5lnXDPjYDbxxbYTZtUMtg0HMF3j8ZmryEw1Iw+A=",
|
||||
"owner": "yusdacra",
|
||||
"repo": "html.nix",
|
||||
"rev": "5bca7064e4de141f85b14a2c5262f204ac5f56bd",
|
||||
"rev": "54b5c7f003c31a171da27f37c7ba1fbb0f38381d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
48
flake.nix
48
flake.nix
@ -9,31 +9,45 @@
|
||||
flakeUtils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { htmlNix, flakeUtils, nixpkgs, ... }@inputs:
|
||||
outputs = {
|
||||
htmlNix,
|
||||
flakeUtils,
|
||||
nixpkgs,
|
||||
...
|
||||
} @ inputs:
|
||||
with flakeUtils.lib;
|
||||
eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
inherit (pkgs.lib) mapAttrsRecursive hasSuffix last pipe;
|
||||
eachDefaultSystem (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
lib = htmlNix.lib.${system};
|
||||
site = local: lib.pkgsLib.mkSiteFrom {
|
||||
inherit local;
|
||||
src = ./.;
|
||||
templater = lib.templaters.basic;
|
||||
};
|
||||
in
|
||||
rec {
|
||||
inherit (builtins) readFile;
|
||||
ssgLib = htmlNix.lib.${system}.pkgsLib;
|
||||
htmlLib = htmlNix.lib;
|
||||
|
||||
site = local:
|
||||
ssgLib.mkSiteFrom {
|
||||
inherit local;
|
||||
src = ./.;
|
||||
templater = ctx:
|
||||
htmlLib.templaters.basic
|
||||
(
|
||||
ctx
|
||||
// {
|
||||
indexContent = builtins.readFile ./main-content.html;
|
||||
resources = {
|
||||
"gaze-office.webp" = ./resources/GazeOfficeIcon.webp;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
in rec {
|
||||
apps = {
|
||||
website = mkApp {
|
||||
drv = lib.pkgsLib.mkServeFromSite (site true);
|
||||
drv = ssgLib.mkServeFromSite (site true);
|
||||
name = "serve";
|
||||
};
|
||||
};
|
||||
packages = {
|
||||
website = lib.pkgsLib.mkSitePath (site false);
|
||||
website = ssgLib.mkSitePath (site false);
|
||||
};
|
||||
defaultPackage = packages.website;
|
||||
defaultApp = apps.website;
|
||||
});
|
||||
}
|
||||
|
1
main-content.html
Normal file
1
main-content.html
Normal file
@ -0,0 +1 @@
|
||||
<img src="resources/gaze-office.webp" style="position: relative; display: block; margin: auto;">
|
BIN
resources/GazeOfficeIcon.webp
Normal file
BIN
resources/GazeOfficeIcon.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue
Block a user