Add devshell and process-compose
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
# 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 = { flake-parts, flake-root, treefmt-nix, ... }@inputs:
|
||||
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 = {
|
||||
@@ -20,13 +25,26 @@
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
perSystem = { config, pkgs, ... }: {
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
pkgs.bashInteractive
|
||||
pkgs.hugo
|
||||
perSystem = { config, pkgs, self', ... }: {
|
||||
devshells.default = {
|
||||
commands = [
|
||||
{
|
||||
package = pkgs.hugo;
|
||||
category = "server";
|
||||
}
|
||||
{
|
||||
package = self'.packages.dev-server;
|
||||
category = "server";
|
||||
help = "Start the development server";
|
||||
}
|
||||
];
|
||||
buildInputs = [ ];
|
||||
#devshell.startup.server.text = "${pkgs.hugo}/bin/hugo serve";
|
||||
};
|
||||
|
||||
process-compose = {
|
||||
dev-server.settings.processes = {
|
||||
hugo.command = "${pkgs.hugo}/bin/hugo serve";
|
||||
};
|
||||
};
|
||||
|
||||
treefmt.config = {
|
||||
|
||||
Reference in New Issue
Block a user