Added rust

This commit is contained in:
Nickiel12 2022-10-10 16:50:15 -07:00
parent e115a557c6
commit 3f0c292332
3 changed files with 35 additions and 2 deletions

View file

@ -35,9 +35,10 @@
home-manager.users.${user} = { home-manager.users.${user} = {
imports = [ imports = [
./home.nix ./home.nix
./modules/zsh.nix ./modules/git.nix
./modules/urxvt.nix ./modules/urxvt.nix
./modules/vim.nix ./modules/vim.nix
./modules/zsh.nix
]; ];
}; };
} }

View file

@ -3,6 +3,13 @@
let let
user = "nixolas"; user = "nixolas";
editor = "vim"; editor = "vim";
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
nixpkgs = import <nixpkgs> {
overlays = [ moz_overlay ];
};
ruststable = (nixpkgs.latest.rustChannels.stable.rust.override {
extensions = [ "rust-src" "rust-analysis" ];}
);
in in
{ {
@ -32,7 +39,12 @@ in
powerline powerline
nodejs # required for coc-nvim nodejs # required for coc-nvim
# Gui application
cargo
rustc
rustfmt
# Gui application
firefox firefox
libsForQt5.kate libsForQt5.kate
]; ];

20
rust-shell-template.nix Normal file
View file

@ -0,0 +1,20 @@
{ pkgs ? import <nixpkgs> {}}:
let
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
ruststable = (pkgs.latest.rustChannels.stable.default.override {
extensions = [
"rust-src"
"rustfmt"
"clippy"
];
});
in
pkgs.mkShell {
buildInputs = with pkgs; [
ruststable
];
RUST_BACKTRACE = 1;
}