diff --git a/flake.nix b/flake.nix index db41641..b438d9f 100644 --- a/flake.nix +++ b/flake.nix @@ -10,9 +10,13 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; }; outputs = { self, nixpkgs, home-manager, supercolor, i3layouts-rofi, kaokao - , mozilla, nixpkgs-unstable }@inputs: + , mozilla, nixpkgs-unstable, fenix }@inputs: let system = "x86_64-linux"; overlay-unstable = final: prev: { @@ -22,11 +26,13 @@ }; }; in { + packages.x86_64-linux.default = + fenix.packages.x86_64-linux.minimal.toolchain; nixosConfigurations.bat = nixpkgs.lib.nixosSystem { inherit system; modules = [ ({ config, pkgs, ... }: { - nixpkgs.overlays = [ mozilla.overlays.rust overlay-unstable ]; + nixpkgs.overlays = [ fenix.overlays.default overlay-unstable ]; }) ./configuration.nix ]; diff --git a/user.nix b/user.nix index c9b81b0..0db990f 100644 --- a/user.nix +++ b/user.nix @@ -1,9 +1,5 @@ { pkgs, supercolor, nixpkgs-unstable, kaokao, i3layouts-rofi, ... }: -let - my-python-packages = p: with p; [ pytest i3ipc python-lsp-server ]; - rust = pkgs.latest.rustChannels.stable.rust.override { - extensions = [ "rust-src" ]; - }; +let my-python-packages = p: with p; [ pytest i3ipc python-lsp-server ]; in { # Define a user account. Don't forget to set a password with ‘passwd’. users.users.zoe = { @@ -156,7 +152,14 @@ in { nodePackages_latest.svelte-language-server nodePackages_latest.svelte-check ## rust - rust + (fenix.stable.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + rust-analyzer-nightly cargo-watch llvmPackages_rocm.clang llvmPackages_rocm.llvm