nixos-config/programs/desktop/development/rust/default.nix
Charlotte 🦝 Delenk eb25937535
Some checks failed
Hydra packages.riscv64-linux.art-lotte Hydra build #25287 of nixos-config:pr618:packages.riscv64-linux.art-lotte
Hydra packages.aarch64-linux.art-lotte Hydra build #25283 of nixos-config:pr618:packages.aarch64-linux.art-lotte
Hydra nixosConfigurations.thinkrac Hydra build #25385 of nixos-config:pr618:nixosConfigurations.thinkrac
Hydra packages.x86_64-linux.art-lotte-bgs-sfw Hydra build #25293 of nixos-config:pr618:packages.x86_64-linux.art-lotte-bgs-sfw
Hydra packages.x86_64-linux.art-lotte-bgs-nsfw Hydra build #25292 of nixos-config:pr618:packages.x86_64-linux.art-lotte-bgs-nsfw
Hydra packages.riscv64-linux.package-updater Hydra build #25374 of nixos-config:pr618:packages.riscv64-linux.package-updater
Hydra packages.aarch64-linux.kodi-joyn Hydra build #25372 of nixos-config:pr618:packages.aarch64-linux.kodi-joyn
Hydra nixosConfigurations.container-default-x86_64-linux Hydra build #25277 of nixos-config:pr618:nixosConfigurations.container-default-x86_64-linux
Hydra packages.aarch64-linux.package-updater Hydra build #25373 of nixos-config:pr618:packages.aarch64-linux.package-updater
Hydra nixosConfigurations.container-default-riscv64-linux Hydra build #25276 of nixos-config:pr618:nixosConfigurations.container-default-riscv64-linux
Hydra packages.riscv64-linux.art-lotte-bgs-sfw Hydra build #25289 of nixos-config:pr618:packages.riscv64-linux.art-lotte-bgs-sfw
Hydra nixosConfigurations.container-default-aarch64-linux Hydra build #25275 of nixos-config:pr618:nixosConfigurations.container-default-aarch64-linux
Hydra packages.aarch64-linux.art-lotte-bgs-nsfw Hydra build #25284 of nixos-config:pr618:packages.aarch64-linux.art-lotte-bgs-nsfw
Hydra packages.aarch64-linux.art-lotte-bgs-sfw Hydra build #25285 of nixos-config:pr618:packages.aarch64-linux.art-lotte-bgs-sfw
Hydra nixosConfigurations.not522-installer Hydra build #25382 of nixos-config:pr618:nixosConfigurations.not522-installer
Hydra packages.riscv64-linux.art-lotte-bgs-nsfw Hydra build #25288 of nixos-config:pr618:packages.riscv64-linux.art-lotte-bgs-nsfw
Hydra packages.x86_64-linux.kodi-joyn Hydra build #25375 of nixos-config:pr618:packages.x86_64-linux.kodi-joyn
Hydra packages.x86_64-linux.package-updater Hydra build #25376 of nixos-config:pr618:packages.x86_64-linux.package-updater
Hydra packages.x86_64-linux.art-lotte Hydra build #25291 of nixos-config:pr618:packages.x86_64-linux.art-lotte
Hydra nixosConfigurations.not522 Hydra build #25381 of nixos-config:pr618:nixosConfigurations.not522
Hydra checks.x86_64-linux.containers-default Hydra build #25380 of nixos-config:pr618:checks.x86_64-linux.containers-default
Hydra nixosConfigurations.rainbow-resort Hydra build #25384 of nixos-config:pr618:nixosConfigurations.rainbow-resort
Hydra nixosConfigurations.pc-installer Hydra build #25383 of nixos-config:pr618:nixosConfigurations.pc-installer
add rustc
2024-11-13 14:38:40 +01:00

47 lines
1.3 KiB
Nix

{
pkgs,
config,
systemConfig,
...
}:
{
home.packages = with pkgs; [
(rust-bin.selectLatestNightlyWith (toolchain: toolchain.default))
cargo-mommy
];
home.shellAliases = {
cargo = "${pkgs.cargo-mommy}/bin/cargo-mommy";
};
home.sessionVariables =
(
if systemConfig.isNSFW then
{
CARGO_MOMMYS_MOODS = "chill/thirsty/yikes";
CARGO_MOMMYS_LITTLE = "racc/plush";
CARGO_MOMMYS_PARTS = "shit/pee";
CARGO_MOMMYS_FUCKING = "pet/toy/toilet/shitslut/septic tank";
}
else
{
CARGO_MOMMYS_MOODS = "chill";
CARGO_MOMMYS_LITTLE = "racc/plush";
}
)
// {
CARGO_HOME = "${config.xdg.dataHome}/cargo";
};
systemd.user.tmpfiles.rules = [
"d ${config.xdg.cacheHome}/cargo - - - - -"
"d ${config.xdg.cacheHome}/cargo/git - - - - -"
"d ${config.xdg.cacheHome}/cargo/registry - - - - -"
"L ${config.xdg.dataHome}/cargo/git - - - - ${config.xdg.cacheHome}/cargo/git"
"L ${config.xdg.dataHome}/cargo/registry - - - - ${config.xdg.cacheHome}/cargo/registry"
];
xdg.dataFile."cargo/config.toml".source = (pkgs.formats.toml { }).generate "config.toml" {
build.target-dir = "${config.xdg.cacheHome}/cargo/target";
profile.release = {
lto = true;
codegen-units = 1;
};
};
}