{ pkgs, inputs, lib, config, flakeDir, True, False, ... }: with lib; let cfg = config.module.programs; in { options = { module.programs = { common.enable = mkEnableOption ""; hyprland.enable = mkEnableOption ""; sway.enable = mkEnableOption ""; steam.enable = mkEnableOption ""; torrserver.enable = mkEnableOption ""; hamachi.enable = mkEnableOption ""; pkgs = mkOption { type = types.listOf types.package; default = null; }; }; }; imports = [ ./torrserver ]; config = mkMerge [ (mkIf cfg.common.enable { environment = { systemPackages = [ ] ++ cfg.pkgs; pathsToLink = [ "/share/zsh" ]; }; programs = { light = True; nano = False; git = True // { package = pkgs.gitMinimal; }; nh = True // { flake = flakeDir; clean = True // { extraArgs = "--keep-since 3d --keep 3"; }; }; }; }) (mkIf cfg.hyprland.enable { programs = { hyprland = with pkgs; let h = inputs.hyprland.packages.${system}; in True // { package = h.hyprland; portalPackage = h.xdg-desktop-portal-hyprland; }; }; }) (mkIf cfg.sway.enable { programs = { sway = True // { package = pkgs.swayfx; }; }; }) (mkIf cfg.steam.enable { environment.systemPackages = with pkgs; [ protonup-qt ]; hardware.xone = True; programs = { gamescope = True; gamemode = True; steam = True // { # GAMING gamescopeSession = True; extraCompatPackages = with pkgs; [ proton-ge-bin ]; package = pkgs.steam.override { extraEnv = { MANGOHUD = true; OBS_VKCAPTURE = true; RADV_TEX_ANISO = 16; }; }; }; }; }) (mkIf cfg.hamachi.enable { programs.haguichi = True; }) ]; }