miom.space/flake.nix

41 lines
1.3 KiB
Nix

{
description = "MiOM homepage live at @ miom.space";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
devshell.url = "github:numtide/devshell";
devshell.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, flake-utils, devshell, nixpkgs }:
flake-utils.lib.simpleFlake {
inherit self nixpkgs;
name = "miom.space";
preOverlays = [ devshell.overlays.default ];
shell = { pkgs }:
let
google-font-downloader = pkgs.writeShellScriptBin "google-font-downloader" ''
echo "Attempting to fetch $1"
${pkgs.nodejs}/bin/npx google-font-downloader -- $1
rm ./_includes/styles/typography.css
echo "/* To regenerate this file, run $ google-font-downloader '$1' */" >> ./_includes/styles/typography.css
echo "" >> ./_includes/styles/typography.css
cat ./google-fonts-*.css >> ./_includes/styles/typography.css
rm ./google-fonts-*.css
'';
in
pkgs.devshell.mkShell {
devshell.packages = with pkgs; [
deno
google-font-downloader
];
bash.extra = ''
export NVIM_USE_DENOLS=1
'';
};
};
}