From 545bdf1f6e6d6105bd5de78ac41703839a12479e Mon Sep 17 00:00:00 2001 From: Stefan Ellmauthaler Date: Thu, 27 Jan 2022 16:36:51 +0100 Subject: [PATCH] moved overlay definition and made overlays more transparent --- baseconfiguration.nix | 12 ++---------- default.nix | 8 +++++++- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/baseconfiguration.nix b/baseconfiguration.nix index 909bc6d..8de4f59 100644 --- a/baseconfiguration.nix +++ b/baseconfiguration.nix @@ -1,12 +1,4 @@ -{ pkgs, name, system, flakes, flakeOutputs, ...}: -let - overlay-unstable = final: prev: { - unstable = import flakes.nixpkgs-unstable { - system = "${system}"; - config.allowUnfree=true; - }; - }; -in +{ pkgs, extraOverlays, name, flakes, flakeOutputs, ...}: { config, pkgs, lib, ...}: { imports = @@ -57,7 +49,7 @@ in }; }; nixpkgs = { - overlays = [ flakes.emacs-overlay.overlay overlay-unstable flakeOutputs.overlay ]; + overlays = [ flakes.emacs-overlay.overlay flakeOutputs.overlay ] ++ extraOverlays; config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "skypeforlinux" "teams" diff --git a/default.nix b/default.nix index 13362b9..db563c9 100644 --- a/default.nix +++ b/default.nix @@ -5,9 +5,15 @@ let name = if builtins.isString args then args else args.name; system = if args ? system then args.system else "x86_64-linux"; extraModules = if args ? extraModules then args.extraModules else [ ]; - extraOverlays = if args ? extraOverlays then args.extraOverlays else [ ]; + extraOverlays = if args ? extraOverlays then args.extraOverlays else [ overlay-unstable ]; pkgs = flakes.nixpkgs; configuration = if args ? configuration then args.configuration else import ./baseconfiguration.nix {inherit extraOverlays system pkgs name flakes flakeOutputs;} ; + overlay-unstable = final: prev: { + unstable = import flakes.nixpkgs-unstable { + system = "${system}"; + config.allowUnfree=true; + }; + }; in { inherit name;