use fenix

This commit is contained in:
zoe 2023-08-22 12:36:32 +02:00
parent b7571d8e1a
commit 31eacdac3a
2 changed files with 17 additions and 8 deletions

View File

@ -10,9 +10,13 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
}; };
outputs = { self, nixpkgs, home-manager, supercolor, i3layouts-rofi, kaokao outputs = { self, nixpkgs, home-manager, supercolor, i3layouts-rofi, kaokao
, mozilla, nixpkgs-unstable }@inputs: , mozilla, nixpkgs-unstable, fenix }@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
overlay-unstable = final: prev: { overlay-unstable = final: prev: {
@ -22,11 +26,13 @@
}; };
}; };
in { in {
packages.x86_64-linux.default =
fenix.packages.x86_64-linux.minimal.toolchain;
nixosConfigurations.bat = nixpkgs.lib.nixosSystem { nixosConfigurations.bat = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
({ config, pkgs, ... }: { ({ config, pkgs, ... }: {
nixpkgs.overlays = [ mozilla.overlays.rust overlay-unstable ]; nixpkgs.overlays = [ fenix.overlays.default overlay-unstable ];
}) })
./configuration.nix ./configuration.nix
]; ];

View File

@ -1,9 +1,5 @@
{ pkgs, supercolor, nixpkgs-unstable, kaokao, i3layouts-rofi, ... }: { pkgs, supercolor, nixpkgs-unstable, kaokao, i3layouts-rofi, ... }:
let let my-python-packages = p: with p; [ pytest i3ipc python-lsp-server ];
my-python-packages = p: with p; [ pytest i3ipc python-lsp-server ];
rust = pkgs.latest.rustChannels.stable.rust.override {
extensions = [ "rust-src" ];
};
in { in {
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.zoe = { users.users.zoe = {
@ -156,7 +152,14 @@ in {
nodePackages_latest.svelte-language-server nodePackages_latest.svelte-language-server
nodePackages_latest.svelte-check nodePackages_latest.svelte-check
## rust ## rust
rust (fenix.stable.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
rust-analyzer-nightly
cargo-watch cargo-watch
llvmPackages_rocm.clang llvmPackages_rocm.clang
llvmPackages_rocm.llvm llvmPackages_rocm.llvm