mirror of
https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git
synced 2025-09-15 09:45:58 +03:00
added Rust toolchain
nix-way setup
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
enable = true;
|
||||
operation = "switch"; # If you don't want to apply updates immediately, only after rebooting, use `boot` option in this case
|
||||
flake = "/etc/nixos";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
flags = [ "--update-input" "nixpkgs" "--update-input" "rust-overlay" "--commit-lock-file" ];
|
||||
dates = "daily";
|
||||
# channel = "https://nixos.org/channels/nixos-unstable";
|
||||
};
|
||||
@@ -343,7 +343,7 @@
|
||||
"gammastep" = {
|
||||
isAllowed = true;
|
||||
isSystem = false;
|
||||
users = [ "1000" ];
|
||||
users = [ "1000" ]; # FIXME: set your user id (to get user id use command 'id -u "your_user_name"')
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -445,6 +445,7 @@
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
gcc13
|
||||
jdk11
|
||||
gleam
|
||||
rebar3
|
||||
@@ -469,9 +470,8 @@
|
||||
nil
|
||||
zls
|
||||
|
||||
rustup
|
||||
evcxr #rust repl
|
||||
rust-analyzer
|
||||
taplo #toml formatter & lsp
|
||||
cargo-deny
|
||||
cargo-audit
|
||||
cargo-update
|
||||
@@ -486,11 +486,7 @@
|
||||
cargo-modules
|
||||
cargo-bloat
|
||||
bacon
|
||||
taplo #toml formatter & lsp
|
||||
|
||||
lldb
|
||||
llvmPackages.bintools
|
||||
gcc13
|
||||
lldb_16
|
||||
|
||||
wasmedge
|
||||
lunatic
|
||||
|
96
nixos/flake.lock
generated
Normal file
96
nixos/flake.lock
generated
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1699099776,
|
||||
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681358109,
|
||||
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1699495996,
|
||||
"narHash": "sha256-m0LWmnEJhHTY4gJX9HPsQ8voZptvr1Sx6dXkk9Xp0sI=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "603e4962d7d2225ba2caf66b0eabfcaa9a93c490",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
@@ -3,14 +3,19 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, ... } @ inputs:
|
||||
outputs = { nixpkgs, rust-overlay, ... } @ inputs:
|
||||
{
|
||||
nixosConfigurations.isitreal-laptop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./configuration.nix
|
||||
({ pkgs, ... }: {
|
||||
nixpkgs.overlays = [ rust-overlay.overlays.default ];
|
||||
environment.systemPackages = [ (pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml) ];
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
9
nixos/rust-toolchain.toml
Normal file
9
nixos/rust-toolchain.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
[toolchain]
|
||||
channel = "stable"
|
||||
components = [ "rust-src", "rust-analyzer" ]
|
||||
targets = [
|
||||
"wasm32-wasi",
|
||||
"x86_64-pc-windows-gnu",
|
||||
"x86_64-unknown-linux-gnu",
|
||||
]
|
||||
profile = "default"
|
Reference in New Issue
Block a user