feat: add nix package, module, and container
Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
parent
45403e9d9b
commit
e928eb67df
7 changed files with 497 additions and 67 deletions
50
nix/dev.nix
Normal file
50
nix/dev.nix
Normal 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;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue