From 1a39cf221e3f647df0767c88d89a54e3813e7019 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sat, 29 Aug 2026 03:45:10 +0530 Subject: refactor: adding explicit options to enable scripts - some scripts that are not critical to the functioning of other options, can be enabled/disabled --- modules/lib/default.nix | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 modules/lib/default.nix (limited to 'modules/lib/default.nix') diff --git a/modules/lib/default.nix b/modules/lib/default.nix deleted file mode 100644 index fd54fa2..0000000 --- a/modules/lib/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -# Internal aggregation for script modules registered via mkScriptModule -{ - config, - lib, - ... -}: -{ - options.scriptPaths = lib.mkOption { - type = lib.types.listOf (lib.types.listOf lib.types.str); - default = [ ]; - internal = true; - description = "Attr paths of script modules registered via mkScriptModule."; - }; - - config = { - home.packages = lib.filter (p: p != null) ( - map (path: (lib.getAttrFromPath path config).package) config.scriptPaths - ); - - xdg.desktopEntries = lib.listToAttrs ( - map - ( - path: - let - name = lib.last path; - sc = lib.getAttrFromPath path config; - in - lib.nameValuePair name { - name = sc.desktop.displayName; - exec = "${lib.getExe config.terminal.kitty.package} --class ${name} -e ${lib.getExe sc.package}"; - icon = sc.desktop.icon; - categories = [ "Utility" ]; - terminal = false; - type = "Application"; - } - ) - ( - lib.filter ( - path: - let - sc = lib.getAttrFromPath path config; - in - sc.enable && sc.desktop.enable - ) config.scriptPaths - ) - ); - }; -} -- cgit v1.2.3