initial commit
All checks were successful
Publish Docker Images / coverage-and-sonar (push) Successful in 9m47s

This commit is contained in:
2026-02-05 16:25:14 +01:00
commit 3258355d2f
22 changed files with 1613 additions and 0 deletions

16
nix/package.nix Normal file
View File

@@ -0,0 +1,16 @@
{
rustPlatform,
...
}: let
cargoToml = fromTOML (builtins.readFile ../Cargo.toml);
name = cargoToml.package.name;
version = cargoToml.package.version;
rustBuild = rustPlatform.buildRustPackage {
pname = name;
inherit version;
src = ../.;
cargoLock.lockFile = ../Cargo.lock;
};
in {
default = rustBuild;
}

11
nix/rust-version.nix Normal file
View File

@@ -0,0 +1,11 @@
{
rust-overlay,
inputs,
system,
...
}: let
overlays = [(import rust-overlay)];
in rec {
pkgs = import inputs.nixpkgs {inherit system overlays;};
version = pkgs.rust-bin.stable.latest.default;
}

44
nix/shell.nix Normal file
View File

@@ -0,0 +1,44 @@
{
inputs,
pkgs,
rustVersion,
...
}:
inputs.devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
{
packages = with pkgs; [
(rustVersion.override {
extensions = [
"clippy"
"rust-src"
"rust-analyzer"
"rustfmt"
];
})
bacon
cargo-deny
cargo-tarpaulin
just
];
processes.run.exec = "cargo watch -x run";
enterShell = ''
echo ""
echo "Rust development environment loaded!"
echo "Rust version: $(rustc --version)"
echo "Cargo version: $(cargo --version)"
echo ""
echo "Available tools:"
echo " - rust-analyzer (LSP)"
echo " - clippy (linter)"
echo " - rustfmt (formatter)"
echo " - bacon (continuous testing/linting)"
echo " - cargo-deny (dependency checker)"
echo " - cargo-tarpaulin (code coverage)"
'';
}
];
}