build: add Bazel Rust workflow

This commit was merged in pull request #2.
This commit is contained in:
2026-08-31 17:50:12 -04:00
parent ba4fbb984a
commit 97cca46f4e
19 changed files with 2088 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
# Bazel for the primary user's shell environment.
let
cfg = config.modules.shell.bazel;
user = config.user.name;
in
{
options.modules.shell.bazel.enable = lib.mkEnableOption "Bazel for the primary user's shell environment";
config = lib.mkIf cfg.enable {
home-manager.users.${user}.home.packages = [ pkgs.bazel ];
};
}

View File

@@ -0,0 +1,35 @@
{
config,
lib,
pkgs,
...
}:
# Rust tools for the primary user's shell environment.
let
cfg = config.modules.shell.rust;
user = config.user.name;
toolchain = pkgs.symlinkJoin {
name = "rust-toolchain";
paths = with pkgs; [
cargo
clippy
gcc
rustc
rustfmt
];
};
in
{
options.modules.shell.rust.enable = lib.mkEnableOption "Rust tools for the primary user's shell environment";
config = lib.mkIf cfg.enable {
home-manager.users.${user} = {
home.packages = [
toolchain
pkgs.rust-analyzer
];
home.sessionVariables.RUST_TOOLCHAIN_ROOT = "${toolchain}";
};
};
}