www/flake.nix

54 lines
1.4 KiB
Nix

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# SPDX-License-Identifier: MPL-2.0
{
inputs = {
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
terminimal = {
url = "github:pawroman/zola-theme-terminimal";
flake = false;
};
};
outputs = {
devshell,
flake-utils,
nixpkgs,
terminimal,
...
}:
(flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
devshell.overlays.default
];
};
in {
formatter = pkgs.alejandra;
devShells.default = let
commands = [
{package = pkgs.zola;}
];
startupScript = ''
mkdir -p themes
ln -snf "${terminimal}" "themes/terminimal"
'';
in
pkgs.devshell.mkShell {
inherit commands;
devshell.startup.themes.text = startupScript;
};
packages.default = pkgs.callPackage ./default.nix {inherit terminimal;};
}))
// {
overlays.default = final: prev: {
www = prev.callPackage ./default.nix {inherit terminimal;};
};
};
}