From f734aea139545011fc34435565630f61647f6be7 Mon Sep 17 00:00:00 2001 From: Christopher Bacher Date: Sat, 29 Oct 2022 13:39:02 +0200 Subject: [PATCH] flake/modules/lib: import lib in modules directly instead of passing it from the flake --- flake.nix | 2 -- modules/pihole-container.factory.nix | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index c425d5e..0ad326a 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,6 @@ outputs = { self, nixpkgs, flake-utils, linger }: with flake-utils.lib; eachSystem (with system; [ x86_64-linux aarch64-linux ]) (curSystem: let - util = import ./lib/util.nix; pkgs = nixpkgs.legacyPackages.${curSystem}; imageName = "pihole/pihole"; @@ -39,7 +38,6 @@ nixosModules.default = (import ./modules/pihole-container.factory.nix) { piholeFlake = self; lingerFlake = linger; - inherit util; }; devShells.default = let diff --git a/modules/pihole-container.factory.nix b/modules/pihole-container.factory.nix index dbac385..41ffcf7 100644 --- a/modules/pihole-container.factory.nix +++ b/modules/pihole-container.factory.nix @@ -1,5 +1,5 @@ -{ piholeFlake, lingerFlake, util }: { config, pkgs, lib, ... }: with lib; with builtins; let - inherit (util) collectAttrFragments accessValueOfFragment toEnvValue; +{ piholeFlake, lingerFlake }: { config, pkgs, lib, ... }: with lib; with builtins; let + inherit (import ../lib/util.nix) collectAttrFragments accessValueOfFragment toEnvValue; cfg = config.services.pihole; hostUserCfg = config.users.users.${cfg.hostConfig.user};