mirror of
https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git
synced 2025-09-15 09:45:58 +03:00
changed some configs for easier building some packages from Cargo
This commit is contained in:
@@ -158,7 +158,7 @@ Here are some tips to enhance your Rust experience on this system:
|
|||||||
- Alternatively, you can install `rustup` through `configuration.nix` and nixpkgs for a system-wide Rust setup. This allows you to manage Rust versions globally through `rustup`.
|
- Alternatively, you can install `rustup` through `configuration.nix` and nixpkgs for a system-wide Rust setup. This allows you to manage Rust versions globally through `rustup`.
|
||||||
|
|
||||||
2. **Troubleshooting Compilation Issues:**
|
2. **Troubleshooting Compilation Issues:**
|
||||||
If you encounter problems during Rust compilation, especially those related to OpenSSL or SQLite (refer [here](https://nixos.wiki/wiki/Rust#Building_Rust_crates_that_require_external_system_libraries)), leverage the `rustenv` fish function. This function is an alias for the `nix-shell -p pkg-config openssl sqlite --run fish` command, opening a Nix shell with the necessary dependencies for seamless code compilation. Additionally, if you use Nix shell, compilation will occur in the runtime directory, which might be insufficient for some projects. You can adjust the runtime directory size in `configuration.nix` under `services.logind.extraConfig="RuntimeDirectorySize=4G"`.
|
If you encounter problems during Rust compilation, especially those related to OpenSSL or SQLite (refer [here](https://nixos.wiki/wiki/Rust#Building_Rust_crates_that_require_external_system_libraries)), leverage the `rustenv` fish function. This function is an alias for the `nix-shell -p pkg-config openssl sqlite protobuf --run fish` command, opening a Nix shell with the necessary dependencies for seamless code compilation. Additionally, if you use Nix shell, compilation will occur in the runtime directory, which might be insufficient for some projects. You can adjust the runtime directory size in `configuration.nix` under `services.logind.extraConfig="RuntimeDirectorySize=8G"`.
|
||||||
|
|
||||||
3. **Cross-Compilation:**
|
3. **Cross-Compilation:**
|
||||||
For cross-compilation, consider using tools like `zigbuild` or `cross`. Personally, I find `zigbuild` preferable, but both are valuable options for your cross-compilation needs.
|
For cross-compilation, consider using tools like `zigbuild` or `cross`. Personally, I find `zigbuild` preferable, but both are valuable options for your cross-compilation needs.
|
||||||
|
@@ -8,7 +8,7 @@ alias ldocker="lazydocker"
|
|||||||
alias conf="z ~/.config"
|
alias conf="z ~/.config"
|
||||||
alias nixos="z /etc/nixos"
|
alias nixos="z /etc/nixos"
|
||||||
alias store="z /nix/store"
|
alias store="z /nix/store"
|
||||||
alias rustenv="nix-shell -p pkg-config openssl sqlite --run fish" # run this command first if you have trouble with openssl or sqlite during compiling a rust project (more https://nixos.wiki/wiki/Rust#Building_Rust_crates_that_require_external_system_libraries)
|
alias rustenv="nix-shell -p pkg-config openssl sqlite protobuf --run fish" # run this command first if you have trouble with openssl, sqlite or protobuf during compiling a rust project (more https://nixos.wiki/wiki/Rust#Building_Rust_crates_that_require_external_system_libraries)
|
||||||
alias nswitch="sudo nixos-rebuild switch --flake /etc/nixos"
|
alias nswitch="sudo nixos-rebuild switch --flake /etc/nixos"
|
||||||
alias nswitchu="sudo nixos-rebuild switch --flake /etc/nixos --upgrade --update-input nixpkgs --update-input rust-overlay --commit-lock-file"
|
alias nswitchu="sudo nixos-rebuild switch --flake /etc/nixos --upgrade --update-input nixpkgs --update-input rust-overlay --commit-lock-file"
|
||||||
alias ncsu="sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos"
|
alias ncsu="sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos"
|
||||||
@@ -23,6 +23,8 @@ set -gx EDITOR hx
|
|||||||
set -gx VOLUME_STEP 5
|
set -gx VOLUME_STEP 5
|
||||||
set -gx BRIGHTNESS_STEP 5
|
set -gx BRIGHTNESS_STEP 5
|
||||||
|
|
||||||
|
set -gx PATH $HOME/.cargo/bin $PATH
|
||||||
|
|
||||||
set fish_vi_force_cursor
|
set fish_vi_force_cursor
|
||||||
set fish_cursor_default block
|
set fish_cursor_default block
|
||||||
set fish_cursor_insert line blink
|
set fish_cursor_insert line blink
|
||||||
|
@@ -145,7 +145,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Change runtime directory size
|
# Change runtime directory size
|
||||||
services.logind.extraConfig = "RuntimeDirectorySize=4G";
|
services.logind.extraConfig = "RuntimeDirectorySize=8G";
|
||||||
|
|
||||||
# Scheduled auto upgrade system (this is only for system upgrades,
|
# Scheduled auto upgrade system (this is only for system upgrades,
|
||||||
# if you want to upgrade cargo\npm\pip global packages, docker containers or different part of the system
|
# if you want to upgrade cargo\npm\pip global packages, docker containers or different part of the system
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
channel = "stable"
|
channel = "stable"
|
||||||
components = [ "rust-src", "rust-analyzer" ]
|
components = [ "rust-src", "rust-analyzer" ]
|
||||||
targets = [
|
targets = [
|
||||||
|
"wasm32-unknown-unknown",
|
||||||
"wasm32-wasi",
|
"wasm32-wasi",
|
||||||
"x86_64-pc-windows-gnu",
|
"x86_64-pc-windows-gnu",
|
||||||
"x86_64-unknown-linux-gnu",
|
"x86_64-unknown-linux-gnu",
|
||||||
|
Reference in New Issue
Block a user