From 08515ffd955e71a74b6207d79071b75162a0e9df Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Tue, 25 Jan 2022 12:16:31 +0100 Subject: [PATCH] [Overlays] Add global overlays configuration --- default.nix | 2 +- overlays.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 overlays.nix diff --git a/default.nix b/default.nix index dc4138b..dd3235e 100644 --- a/default.nix +++ b/default.nix @@ -12,7 +12,7 @@ ./hardening.nix ./hardware.nix ./laptop.nix - # ./overlays.nix + ./overlays.nix ./non-persistence.nix ]; } diff --git a/overlays.nix b/overlays.nix new file mode 100644 index 0000000..235edcf --- /dev/null +++ b/overlays.nix @@ -0,0 +1,30 @@ +{config, pkgs, options, lib, ...}: +with lib; +let + cfg = config.aviallon.overlays; +in +{ + options.aviallon.overlays = { + enable = mkOption { + default = true; + type = types.bool; + }; + }; + config = mkIf cfg.enable { + nix.nixPath = + # Prepend default nixPath values. + options.nix.nixPath.default ++ + # Append our nixpkgs-overlays. + [ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ] + ; + + + nixpkgs.overlays = [ + # (self: super: { + # nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { + # inherit pkgs; + # }; + # }) + ]; + }; +}