{ inputs, povSelf, config, lib, pkgs, homeManagerModules, ... }: let inherit (lib) types; cfg = lib.getAttrFromPath povSelf config; in { options.enable = { type = types.bool; default = false; }; config = lib.mkIf cfg.enable ( lib.mkMerge [ ( #if we have home-manager enabled... but packages in the user environment lib.mkIf config.modules.homeManager.enable { home-manager.sharedModules = [ { home.packages = with pkgs; [ yubikey-manager yubioath-flutter ]; } ]; } ) ( # if not... put it in the system environment lib.mkIf (!config.modules.homeManager.enable) { environment.systemPackages = with pkgs; [ yubikey-manager yubioath-flutter ]; } ) { programs.yubikey-touch-detector.enable = true; } ] ); }