diff --git a/nixos/flake.lock b/nixos/flake.lock index 6803205..baa2476 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "fenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1734590149, + "narHash": "sha256-NcfLaETnNMPHTlu7/oTrihCjTL6G2DIe6lHZ68o2n8w=", + "owner": "nix-community", + "repo": "fenix", + "rev": "81afc33397436c678482a1560bbc810cc3504dbc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -82,11 +103,29 @@ }, "root": { "inputs": { + "fenix": "fenix", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nur": "nur" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1734531725, + "narHash": "sha256-IGe/elaXn5XXA62RIL9OuLMq1vgrUCm+bYPqYCZJ7Ug=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "27fac08c82210837a2ac84fa5e39eee6993f1605", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/nixos/flake.nix b/nixos/flake.nix index 02fd434..cc39971 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -7,10 +7,16 @@ url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + # Nix User Repository nur = { url = "github:nix-community/NUR"; inputs.nixpkgs.follows = "nixpkgs"; }; + # Rust toolchains + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, home-manager, ... }@inputs: { diff --git a/nixos/overlays/default.nix b/nixos/overlays/default.nix index 5bd8b14..8d2c8ff 100644 --- a/nixos/overlays/default.nix +++ b/nixos/overlays/default.nix @@ -2,5 +2,6 @@ { nixpkgs.overlays = [ inputs.nur.overlays.default + inputs.fenix.overlays.default ]; } diff --git a/nixos/packages.nix b/nixos/packages.nix index 1ddb8dc..a668b6f 100644 --- a/nixos/packages.nix +++ b/nixos/packages.nix @@ -2,9 +2,12 @@ { environment.systemPackages = with pkgs; [ # development + (fenix.default.withComponents [ "cargo" "rustc" ]) just + nodejs_23 ## language servers - nil # Nix + nil # Nix + rust-analyzer # Rust # games prismlauncher # graphics