switch to emanote

This commit is contained in:
dusk 2022-08-14 07:17:24 +03:00
parent dc1b24e752
commit 52883d01be
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
6 changed files with 130 additions and 115 deletions

View File

@ -1 +0,0 @@
My website

View File

@ -1,2 +0,0 @@
title = "dusk's stuff"
baseurl = "https://gaze.systems"

View File

@ -1,64 +1,143 @@
{ {
"nodes": { "nodes": {
"flakeUtils": { "ema": {
"flake": false,
"locked": { "locked": {
"lastModified": 1648297722, "lastModified": 1659891375,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", "narHash": "sha256-UDI8AACQf84Mc8V//6KeTGj9Djlsj291gDslHMEIX48=",
"owner": "numtide", "owner": "srid",
"repo": "flake-utils", "repo": "ema",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", "rev": "b052ad1b2f5d483ff3ed3b664df8ce419345d852",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "srid",
"repo": "flake-utils", "ref": "master",
"repo": "ema",
"type": "github" "type": "github"
} }
}, },
"htmlNix": { "emanote": {
"inputs": {
"ema": "ema",
"flake-parts": "flake-parts",
"haskell-flake": "haskell-flake",
"nixpkgs": "nixpkgs",
"tailwind-haskell": "tailwind-haskell"
},
"locked": {
"lastModified": 1660407353,
"narHash": "sha256-dNjJ8ti0HZaHzGzWOHZq0UuWruizSDxDQS8v2bYGx9s=",
"owner": "srid",
"repo": "emanote",
"rev": "0828297369dc4753134ff67287d0c303111f5c48",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "emanote",
"type": "github"
}
},
"flake-parts": {
"inputs": { "inputs": {
"flakeUtils": [
"flakeUtils"
],
"nixpkgs": [ "nixpkgs": [
"emanote",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1659251276, "lastModified": 1657102481,
"narHash": "sha256-rHhaPtyH1hBcZxd6nXxyg59wL6ilqJqsfuHh8Ebd+rA=", "narHash": "sha256-62Fuw8JgPub38OdgNefkIKOodM9nC3M0AG6lS+7smf4=",
"ref": "refs/heads/master", "owner": "hercules-ci",
"rev": "d30b07841100278a1d7901001ecec038c5448be2", "repo": "flake-parts",
"revCount": 50, "rev": "608ed3502263d6f4f886d75c48fc2b444a4ab8d8",
"type": "git", "type": "github"
"url": "https://git.gaze.systems/dusk/html.nix.git"
}, },
"original": { "original": {
"type": "git", "owner": "hercules-ci",
"url": "https://git.gaze.systems/dusk/html.nix.git" "repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1652776076,
"narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8",
"type": "github"
},
"original": {
"owner": "numtide",
"ref": "v1.0.0",
"repo": "flake-utils",
"type": "github"
}
},
"haskell-flake": {
"locked": {
"lastModified": 1654001497,
"narHash": "sha256-GfrpyoQrVT9Z/j9its8BQs3I5O5X5Lc2IkK922bz7zg=",
"owner": "srid",
"repo": "haskell-flake",
"rev": "4c0b0ff295f0b97238a600d2381c37ee46b67f9c",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "haskell-flake",
"type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1649408932, "lastModified": 1657447684,
"narHash": "sha256-JhTW1OtS5fACcRXLqcTTQyYO5vLkO+bceCqeRms13SY=", "narHash": "sha256-FCP9AuU1q6PE3vOeM5SFf58f/UKPBAsoSGDUGamNBbo=",
"owner": "NixOS", "path": "/nix/store/a885zpv9ys2p2x7qnzqvxlsy321mclip-source",
"repo": "nixpkgs", "rev": "5f43d8b088d3771274bcfb69d3c7435b1121ac88",
"rev": "42948b300670223ca8286aaf916bc381f66a5313", "type": "path"
"type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "id": "nixpkgs",
"ref": "nixos-unstable", "type": "indirect"
"repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"flakeUtils": "flakeUtils", "emanote": "emanote",
"htmlNix": "htmlNix", "flake-parts": [
"nixpkgs": "nixpkgs" "emanote",
"flake-parts"
],
"nixpkgs": [
"emanote",
"nixpkgs"
]
}
},
"tailwind-haskell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"emanote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1657796772,
"narHash": "sha256-4JD3a9frE26VjaJysyd+DIHUJUiWsx/bFrk8tsGMSpU=",
"owner": "srid",
"repo": "tailwind-haskell",
"rev": "96f4c7f8c59eb1103b75ff7d4a753d2d4b9c1ee7",
"type": "github"
},
"original": {
"owner": "srid",
"ref": "master",
"repo": "tailwind-haskell",
"type": "github"
} }
} }
}, },

View File

@ -1,83 +1,22 @@
{ {
nixConfig.extra-substituters = "https://cache.garnix.io";
nixConfig.extra-trusted-public-keys = "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=";
inputs = { inputs = {
htmlNix = { emanote.url = "github:srid/emanote";
url = "git+https://git.gaze.systems/dusk/html.nix.git"; nixpkgs.follows = "emanote/nixpkgs";
inputs.flakeUtils.follows = "flakeUtils"; flake-parts.follows = "emanote/flake-parts";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flakeUtils.url = "github:numtide/flake-utils";
}; };
outputs = { outputs = inputs@{self, flake-parts, nixpkgs, ...}:
htmlNix, flake-parts.lib.mkFlake { inherit self; } {
flakeUtils, systems = ["x86_64-linux"];
nixpkgs, imports = [inputs.emanote.flakeModule];
... perSystem = {self', ...}: {
} @ inputs: emanote.sites."blog" = {
with flakeUtils.lib; path = ./.;
eachDefaultSystem (system: let pathString = ".";
pkgs = nixpkgs.legacyPackages.${system};
inherit (builtins) readFile;
ssgLib = htmlNix.lib.${system}.pkgsLib;
htmlLib = htmlNix.lib;
aboutContent =
builtins.readFile
(
ssgLib.parseMarkdown
"about.html"
(builtins.readFile ./about.md)
);
site = local:
ssgLib.mkSiteFrom {
inherit local;
src = ./.;
templater = ctx: let
out =
htmlLib.templaters.basic
(
ctx
// {
indexContent = ''
${aboutContent}
<img class="logo" src="resources/gaze-office.webp" style="position: fixed; left: 87%; top: 9%;">
'';
}
);
in
out
// {
site =
out.site
// {
resources."gaze-office.webp" =
./resources/GazeOfficeIcon.webp;
"site.css" = ''
${out.site."site.css"}
${
htmlLib.css.media "max-width: 48em"
{
"img.logo" = {
display = "none";
};
}
}
'';
};
};
};
in rec {
apps = {
website = mkApp {
drv = ssgLib.mkServeFromSite (site true);
name = "serve";
};
}; };
packages = { };
website = ssgLib.mkSitePath (site false); };
};
});
} }

View File