{ pkgs , lib , config , ... }: with lib; let gui = with config.global.gui; ( enable && session ); in { config = { users.homeModules = [ # this module passes gui configuration to home-manager { passthrough.gui = gui; } ]; users.adminGroups = mkIf gui [ "video" ]; # themes and icons environment.systemPackages = with pkgs; mkIf gui [ whitesur-gtk-theme whitesur-icon-theme bibata-cursors ]; security = mkIf gui { polkit.enable = true; }; fonts.enableDefaultPackages = mkIf gui true; programs = mkIf gui { dconf.enable = true; }; }; }