Files
homepage/flake.nix
T

72 lines
1.7 KiB
Nix

# github.com/brianmcgee has lots of great ideas for going above and beyond for this
{
description = "Greg's homepage";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
devshell.url = "github:numtide/devshell";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-root.url = "github:srid/flake-root";
process-compose.url = "github:Platonic-Systems/process-compose-flake";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs = { devshell, flake-parts, flake-root, process-compose, treefmt-nix, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devshell.flakeModule
inputs.flake-root.flakeModule
inputs.process-compose.flakeModule
inputs.treefmt-nix.flakeModule
];
flake = {
# Universal things
};
systems = [
"x86_64-linux"
"aarch64-linux"
];
perSystem = { config, pkgs, self', ... }: {
devshells.default = {
commands = [
{
package = pkgs.hugo;
category = "server";
}
{
package = self'.packages.dev-server;
category = "server";
help = "Start the development server";
}
];
#devshell.startup.server.text = "${pkgs.hugo}/bin/hugo serve";
};
process-compose = {
dev-server.settings.processes = {
hugo.command = "${pkgs.hugo}/bin/hugo serve";
};
};
treefmt.config = {
inherit (config.flake-root) projectRootFile;
package = pkgs.treefmt;
programs = {
deadnix.enable = true;
#mdformat.enable = false;
};
settings.formatter = {
#mdformat = {
# includes = pkgs.lib.mkForce [
# "archtypes/*.md"
# "content/*.md"
# "public/*.md"
# ];
#};
};
};
};
};
}