From 24d167cb3fce1d24a9249af051941e896c4eba0c Mon Sep 17 00:00:00 2001 From: chn Date: Mon, 25 Mar 2024 11:26:53 +0800 Subject: [PATCH] =?UTF-8?q?system.envfs:=20=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/system/envfs.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/system/envfs.nix b/modules/system/envfs.nix index 97f26985..462c9f03 100644 --- a/modules/system/envfs.nix +++ b/modules/system/envfs.nix @@ -1,10 +1,8 @@ inputs: { - options.nixos.system.envfs = let inherit (inputs.lib) mkOption types; in - { - enable = mkOption { type = types.bool; default = true; }; - }; - config = inputs.lib.mkIf inputs.config.nixos.system.envfs.enable (inputs.lib.mkMerge + options.nixos.system.envfs = let inherit (inputs.lib) mkOption types; in mkOption + { type = types.nullOr (types.submodule {}); default = {}; }; + config = let inherit (inputs.config.nixos.system) envfs; in inputs.lib.mkIf (envfs != null) (inputs.lib.mkMerge [ (builtins.elemAt inputs.topInputs.envfs.nixosModules.envfs.imports 0 inputs) { environment.variables.ENVFS_RESOLVE_ALWAYS = "1"; }