www/flake.nix

55 lines
1.4 KiB
Nix
Raw Normal View History

2023-09-13 15:45:47 -05:00
# 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 = {
2023-09-14 14:51:37 -05:00
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-04-04 20:20:39 -05:00
flake-utils.url = "github:numtide/flake-utils";
2025-01-15 13:50:07 -06:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
terminimal = {
url = "github:pawroman/zola-theme-terminimal";
2023-09-14 14:51:37 -05:00
flake = false;
};
2023-09-13 15:45:47 -05:00
};
outputs = {
2023-09-14 14:51:37 -05:00
devshell,
2023-09-13 15:45:47 -05:00
flake-utils,
nixpkgs,
2025-01-15 13:50:07 -06:00
terminimal,
2023-09-13 15:45:47 -05:00
...
2023-09-14 15:35:58 -05:00
}:
(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
2025-01-15 13:50:07 -06:00
ln -snf "${terminimal}" "themes/terminimal"
2023-09-14 15:35:58 -05:00
'';
in
pkgs.devshell.mkShell {
inherit commands;
devshell.startup.themes.text = startupScript;
};
2025-01-15 13:50:07 -06:00
packages.default = pkgs.callPackage ./default.nix {inherit terminimal;};
2023-09-14 15:35:58 -05:00
}))
// {
overlays.default = final: prev: {
2025-01-15 13:50:07 -06:00
www = prev.callPackage ./default.nix {inherit terminimal;};
2023-09-14 14:51:37 -05:00
};
};
2023-09-13 15:45:47 -05:00
}