From 7d09557096e277445b60ca80c0b19366ec612432 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 16 Oct 2017 21:46:13 +0200 Subject: [PATCH] feat: Add nixpkgs-mozilla overlay Imports the nixpkgs-mozilla overlay and installs stable Rust from the same channel as rustup. --- .gitmodules | 3 +++ configuration.nix | 11 +++++++---- nixpkgs-mozilla | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .gitmodules create mode 160000 nixpkgs-mozilla diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..b51f28b60 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "nixpkgs-mozilla"] + path = nixpkgs-mozilla + url = git@github.com:mozilla/nixpkgs-mozilla.git diff --git a/configuration.nix b/configuration.nix index 02c6c3288..64f52aa5f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,8 +4,8 @@ { config, pkgs, ... }: -let - unstable = import { config.allowUnfree = true; }; +let rust-overlay = import "/etc/nixos/nixpkgs-mozilla/rust-overlay.nix"; + unstable = import { config.allowUnfree = true; }; in { imports = [ # Include the results of the hardware scan. @@ -13,6 +13,10 @@ in { ./local-configuration.nix ]; + # Configure the Nix package manager + nixpkgs.config.allowUnfree = true; + nixpkgs.overlays = [ rust-overlay ]; + # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -26,7 +30,7 @@ in { # $ nix-env -qaP | grep wget environment.systemPackages = with pkgs; [ curl gnumake unzip openjdk gcc htop tree direnv tmux fish ripgrep - gnupg pass git manpages stdmanpages + gnupg pass git manpages stdmanpages latest.rustChannels.stable.rust ]; # Enable the X11 windowing system. @@ -52,7 +56,6 @@ in { # Configure other random applications: programs.java.enable = true; - nixpkgs.config.allowUnfree = true; # Configure fonts fonts = { diff --git a/nixpkgs-mozilla b/nixpkgs-mozilla new file mode 160000 index 000000000..6179dd876 --- /dev/null +++ b/nixpkgs-mozilla @@ -0,0 +1 @@ +Subproject commit 6179dd876578ca2931f864627598ede16ba6cdef