feat: add nix package, module, and container

Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
seth 2023-12-03 04:14:20 -05:00
parent 45403e9d9b
commit e928eb67df
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
7 changed files with 497 additions and 67 deletions

50
nix/dev.nix Normal file
View file

@ -0,0 +1,50 @@
{
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;
};
}