diff --git a/flake.lock b/flake.lock index d644ed1..37b1a07 100644 --- a/flake.lock +++ b/flake.lock @@ -1216,6 +1216,27 @@ "type": "github" } }, + "fenix_2": { + "inputs": { + "nixpkgs": [ + "nixos" + ], + "rust-analyzer-src": "rust-analyzer-src_2" + }, + "locked": { + "lastModified": 1659421644, + "narHash": "sha256-b7M9YxF2C1CClvbS5NMjheiyLF8KzX03eiVfYtXbVEw=", + "owner": "nix-community", + "repo": "fenix", + "rev": "862c23b3607d13166ef7493c7dc0995b1771a583", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -1939,6 +1960,7 @@ "bud": "bud", "deploy": "deploy", "digga": "digga", + "fenix": "fenix_2", "fork": "fork", "hlissner-dotfiles": "hlissner-dotfiles", "home": "home", @@ -1970,6 +1992,23 @@ "type": "github" } }, + "rust-analyzer-src_2": { + "flake": false, + "locked": { + "lastModified": 1659363473, + "narHash": "sha256-uamnlKqr5eReaefkoo7/ki05ZvIlJFwdFNM4znNhUqY=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "8e38833c3674c1be7d81c6069c62e6ed52b18b27", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "stable": { "locked": { "lastModified": 1655729248, diff --git a/flake.nix b/flake.nix index 9ac53c6..4ca3b76 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,10 @@ # # --- Minecraft nix-minecraft.url = "github:Infinidoge/nix-minecraft"; nix-minecraft.inputs.nixpkgs.follows = "nixos"; + + # # --- Rust + fenix.url = "github:nix-community/fenix"; + fenix.inputs.nixpkgs.follows = "nixos"; }; outputs = @@ -76,6 +80,7 @@ # --- Domain-Specific Overlays inputs.powercord-setup.overlay inputs.nix-minecraft.overlay + inputs.fenix.overlay ]; }; stable = { }; @@ -139,6 +144,7 @@ haskell java nim + rust ]) ]; }; diff --git a/profiles/develop/programming/rust.nix b/profiles/develop/programming/rust.nix new file mode 100644 index 0000000..54c3169 --- /dev/null +++ b/profiles/develop/programming/rust.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; [ + (fenix.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + rust-analyzer-nightly + gcc + ]; +}