nix_for_rustaceans/flake.nix

56 lines
1.4 KiB
Nix
Raw Permalink Normal View History

2024-07-09 20:55:42 +02:00
{
description = "Description for the project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
devshell.url = "github:numtide/devshell";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devshell.flakeModule
inputs.treefmt-nix.flakeModule
];
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
perSystem =
{
config,
self',
inputs',
pkgs,
system,
...
}:
{
treefmt = {
programs.nixfmt.enable = true;
2024-07-11 13:49:04 +02:00
programs.prettier.enable = true;
2024-07-09 20:55:42 +02:00
projectRootFile = "flake.nix";
};
devshells.default = {
serviceGroups.marp.services.marp.command = "marp --watch";
commands = [
{
help = "Build presentation and present";
name = "present";
command = "marp && xdg-open ./present/slides.html";
}
];
packages = [
pkgs.marp-cli
config.treefmt.build.wrapper
];
};
};
};
}