mirror of
https://github.com/ryanccn/flake.git
synced 2026-01-27 04:06:28 +01:00
feat(rust): switch to rust-overlay, use mold
This commit is contained in:
parent
2eb3764b31
commit
3861c0442b
2 changed files with 5 additions and 15 deletions
|
|
@ -7,22 +7,12 @@
|
||||||
toml = pkgs.formats.toml {};
|
toml = pkgs.formats.toml {};
|
||||||
in {
|
in {
|
||||||
home.file."${config.xdg.dataHome}/cargo/config.toml".source = toml.generate "config.toml" {
|
home.file."${config.xdg.dataHome}/cargo/config.toml".source = toml.generate "config.toml" {
|
||||||
build.rustc-wrapper = "${lib.getExe' pkgs.sccache "sccache"}";
|
linker = "${lib.getExe pkgs.clang}";
|
||||||
|
rustflags = ["-C" "link-arg=-fuse-ld=${lib.getExe pkgs.mold}"];
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
(fenix.combine (
|
rust-bin.stable.latest.default
|
||||||
with fenix;
|
|
||||||
with stable; [
|
|
||||||
cargo
|
|
||||||
rustc
|
|
||||||
rustfmt
|
|
||||||
clippy
|
|
||||||
rust-src
|
|
||||||
targets.wasm32-unknown-unknown.stable.rust-std
|
|
||||||
]
|
|
||||||
))
|
|
||||||
|
|
||||||
cargo-bloat
|
cargo-bloat
|
||||||
cargo-cache
|
cargo-cache
|
||||||
cargo-deny
|
cargo-deny
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services.nix-daemon.enable = true;
|
services.nix-daemon.enable = true;
|
||||||
nix.package = pkgs.nix;
|
nix.package = pkgs.nixVersions.unstable;
|
||||||
|
|
||||||
nix.registry = {
|
nix.registry = {
|
||||||
n.flake = inputs.nixpkgs;
|
n.flake = inputs.nixpkgs;
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = [
|
overlays = [
|
||||||
inputs.fenix.overlays.default
|
inputs.rust-overlay.overlays.default
|
||||||
inputs.am.overlays.default
|
inputs.am.overlays.default
|
||||||
inputs.nish.overlays.default
|
inputs.nish.overlays.default
|
||||||
inputs.nrr.overlays.default
|
inputs.nrr.overlays.default
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue