From 2d03d4af5b8f6393704cd1bb93cd16084a52c2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 20 Jan 2024 06:58:09 +0200 Subject: [PATCH] flake.nix: construct overlays cleanly thanks to @jonringer in https://discourse.nixos.org/t/overlays-in-nested-flakes/17066/2 --- flake.nix | 4 +--- modules/e11sync/default.nix | 11 +++-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 4e3bb13..f4101af 100644 --- a/flake.nix +++ b/flake.nix @@ -124,8 +124,6 @@ self.nixosModules.e11sync ]; }; - nixosModules.e11sync = import ./modules/e11sync { - inherit nixpkgs geoip2-tarball; - }; + nixosModules.e11sync = import ./modules/e11sync geoip2-tarball; }; } diff --git a/modules/e11sync/default.nix b/modules/e11sync/default.nix index d596824..7f7a7c0 100644 --- a/modules/e11sync/default.nix +++ b/modules/e11sync/default.nix @@ -1,16 +1,11 @@ -{ - nixpkgs, - geoip2-tarball, -}: { +geoip2-tarball: { config, lib, pkgs, ... }: let - pkgs1 = import nixpkgs { - inherit (pkgs.stdenv.hostPlatform) system; - overlays = import ../../overlays.nix geoip2-tarball; - }; + overlays = import ../../overlays.nix geoip2-tarball; + pkgs1 = pkgs.extend (lib.composeManyExtensions overlays); in { options.e11sync = with lib.types; { enable = lib.mkEnableOption "Enable e11sync";