NixOS configuration 馃獎
at refactor/mkService 29 lines 532 B view raw
1{ lib, ... }: 2let 3 inherit (lib) 4 any 5 getAttr 6 forEach 7 ; 8 9 inherit (lib.attrsets) 10 getAttrFromPath 11 attrByPath 12 ; 13 14 # Search through every home-module configuration and check if this module is anywhere activated 15 anyHomeModuleActive = 16 config: modulePath: 17 let 18 modulesList = ( 19 forEach config.sylveon.system.users ( 20 name: getAttrFromPath modulePath config.home-manager.users.${name} 21 ) 22 ); 23 in 24 any (x: x) modulesList; 25 26in 27{ 28 inherit anyHomeModuleActive; 29}