From cbce86bee5259ad82942bbca05e5d7203c905b56 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sat, 28 Jan 2023 14:15:45 -0800 Subject: [PATCH] feat: Added cargo and rustc to default commands --- flake.nix | 7 ++++--- hosts/default.nix | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 23638c1..b43113c 100644 --- a/flake.nix +++ b/flake.nix @@ -7,17 +7,18 @@ url = github:nix-community/home-manager; inputs.nixpkgs.follows = "nixpkgs"; }; - + + rust-overlay.url = "github:oxalica/rust-overlay"; kmonad.url = "github:kmonad/kmonad?dir=nix"; }; - outputs = inputs@{ self, nixpkgs, home-manager, kmonad }: + outputs = inputs@{ self, nixpkgs, home-manager, kmonad, rust-overlay }: let user = "nixolas"; in { nixosConfigurations = import ./hosts { inherit (nixpkgs) lib; - inherit inputs nixpkgs home-manager user kmonad; + inherit inputs nixpkgs home-manager user kmonad rust-overlay; }; }; } diff --git a/hosts/default.nix b/hosts/default.nix index 6e6c8ba..d691161 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,4 +1,4 @@ -{ lib, inputs, nixpkgs, home-manager, user, kmonad, ... }: +{ lib, inputs, nixpkgs, home-manager, user, kmonad, rust-overlay, ... }: let system = "x86_64-linux"; @@ -19,6 +19,10 @@ in { { networking.hostName = "NicksNixLaptop"; } + ({ pkgs, ... }: { + nixpkgs.overlays = [ rust-overlay.overlays.default ]; + environment.systemPackages = [ pkgs.rust-bin.stable.latest.default ]; + }) kmonad.nixosModules.default home-manager.nixosModules.home-manager { home-manager = {