refraction/nix/dev.nix
seth e928eb67df
feat: add nix package, module, and container
Signed-off-by: seth <getchoo@tuta.io>
2023-12-03 18:29:09 -05:00

50 lines
934 B
Nix

{
perSystem = {
lib,
pkgs,
config,
...
}: {
pre-commit.settings.hooks = {
actionlint.enable = true;
alejandra.enable = true;
rustfmt.enable = true;
nil.enable = true;
prettier = {
enable = true;
excludes = ["flake.lock"];
};
};
proc.groups.daemons.processes = {
redis.command = "${lib.getExe' pkgs.redis "redis-server"}";
};
devShells.default = pkgs.mkShell {
shellHook = ''
${config.pre-commit.installationScript}
'';
packages = with pkgs; [
# general
actionlint
config.proc.groups.daemons.package
# rust
cargo
rustc
clippy
rustfmt
rust-analyzer
# nix
config.formatter
nil
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
formatter = pkgs.alejandra;
};
}