From 2a7b36213c1b8bc9e03466bd7b99fa96abfecd8f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 26 Sep 2022 17:50:41 -0700 Subject: feat(naersk): use naersk to build packages with rust naersk makes it simple to build rust project in nix. For this to work, `mkSystem` and `mkHomeManagerConfiguration` needs to pass naersk to my overlays. I dropped the support to run the tools with `nix run .#tools...`: I don't use this in practice and it's not making things simpler. I dropped `nix-linter` from the check, it's reporting many errors without helping me to fix them. --- nix/mkHomeManagerConfiguration.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'nix/mkHomeManagerConfiguration.nix') diff --git a/nix/mkHomeManagerConfiguration.nix b/nix/mkHomeManagerConfiguration.nix index bcf374a..70e875d 100644 --- a/nix/mkHomeManagerConfiguration.nix +++ b/nix/mkHomeManagerConfiguration.nix @@ -3,9 +3,11 @@ inputs@{ self, ... }: , username ? "fcuny" , hostname , stateVersion ? "22.05" -, extraModules ? [ ] , }: +let + naersk = inputs.naersk.lib."${system}"; +in inputs.home-manager.lib.homeManagerConfiguration { inherit system; inherit username; @@ -19,8 +21,12 @@ inputs.home-manager.lib.homeManagerConfiguration { overlays = [ inputs.emacs-overlay.overlay inputs.nur.overlay + inputs.naersk.overlay inputs.rust.overlays.default - (final: prev: { tools = import "${self}/tools" { pkgs = prev; }; }) + (final: prev: + { + tools = import "${self}/tools" { pkgs = prev; inherit naersk; }; + }) ]; }; configuration.imports = -- cgit 1.4.1