Files
homepage/flake.nix
T

72 lines
1.7 KiB
Nix
Raw Normal View History

2024-04-21 23:30:44 -05:00
# github.com/brianmcgee has lots of great ideas for going above and beyond for this
2022-10-10 16:04:24 -05:00
{
2024-04-21 22:17:01 -05:00
description = "Greg's homepage";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2024-04-21 23:30:44 -05:00
devshell.url = "github:numtide/devshell";
2024-04-21 22:17:01 -05:00
flake-parts.url = "github:hercules-ci/flake-parts";
2024-04-21 22:39:55 -05:00
flake-root.url = "github:srid/flake-root";
2024-04-21 23:30:44 -05:00
process-compose.url = "github:Platonic-Systems/process-compose-flake";
2024-04-21 22:39:55 -05:00
treefmt-nix.url = "github:numtide/treefmt-nix";
2024-04-21 22:17:01 -05:00
};
2022-10-10 16:04:24 -05:00
2024-04-21 23:30:44 -05:00
outputs = { devshell, flake-parts, flake-root, process-compose, treefmt-nix, ... }@inputs:
2024-04-21 22:17:01 -05:00
flake-parts.lib.mkFlake { inherit inputs; } {
2024-04-21 22:39:55 -05:00
imports = [
2024-04-21 23:30:44 -05:00
inputs.devshell.flakeModule
2024-04-21 22:39:55 -05:00
inputs.flake-root.flakeModule
2024-04-21 23:30:44 -05:00
inputs.process-compose.flakeModule
2024-04-21 22:39:55 -05:00
inputs.treefmt-nix.flakeModule
];
2024-04-21 22:17:01 -05:00
flake = {
# Universal things
};
systems = [
"x86_64-linux"
"aarch64-linux"
];
2024-04-21 23:30:44 -05:00
perSystem = { config, pkgs, self', ... }: {
devshells.default = {
commands = [
{
package = pkgs.hugo;
category = "server";
}
{
package = self'.packages.dev-server;
category = "server";
help = "Start the development server";
}
2024-04-21 22:17:01 -05:00
];
2024-04-21 23:30:44 -05:00
#devshell.startup.server.text = "${pkgs.hugo}/bin/hugo serve";
};
process-compose = {
dev-server.settings.processes = {
hugo.command = "${pkgs.hugo}/bin/hugo serve";
};
2024-04-21 22:17:01 -05:00
};
2024-04-21 22:39:55 -05:00
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"
# ];
#};
};
};
2024-04-21 22:17:01 -05:00
};
};
2022-10-10 16:04:24 -05:00
}