From 30f8fea050f3242f0e6a2072779e706b5c8ceaf1 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Thu, 24 Sep 2026 03:42:25 +0530 Subject: refactor(modules): introduce cfg local bindings and submodule option types --- modules/file-management/ouch/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modules/file-management/ouch/default.nix') diff --git a/modules/file-management/ouch/default.nix b/modules/file-management/ouch/default.nix index c8986fe..461e3cf 100644 --- a/modules/file-management/ouch/default.nix +++ b/modules/file-management/ouch/default.nix @@ -1,10 +1,13 @@ # CLI tool for compressing and decompressing various formats { - pkgs, - lib, config, + lib, + pkgs, ... }: +let + cfg = config.file-management.ouch; +in { options.file-management.ouch = { enable = lib.mkEnableOption "Enables ouch."; @@ -18,7 +21,7 @@ }; }; - config = lib.mkIf config.file-management.ouch.enable { - home.packages = [ config.file-management.ouch.package ]; + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; }; } -- cgit v1.2.3