From eabf6392dcff2f2f1e63a0684d37a06719540580 Mon Sep 17 00:00:00 2001 From: ChUrl Date: Mon, 17 Apr 2023 18:54:30 +0200 Subject: [PATCH] Disable some old flatpak related options --- home/christoph/nixinator/default.nix | 9 ++++---- home/modules/flatpak.nix | 7 ++++++ home/modules/gaming.nix | 34 ++++++++++++++++------------ 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/home/christoph/nixinator/default.nix b/home/christoph/nixinator/default.nix index 97450b6a..14f1b1a5 100644 --- a/home/christoph/nixinator/default.nix +++ b/home/christoph/nixinator/default.nix @@ -25,7 +25,7 @@ rec { tenacity.enable = true; faust.enable = true; - bottles.enable = true; + bottles.enable = false; yabridge.enable = true; yabridge.autoSync = true; @@ -46,15 +46,16 @@ rec { prism.enable = true; bottles.enable = true; # TODO: Webcord - discordChromium.enable = false; - discordElectron.enable = false; # This is the nixpkgs version, prefer the one from flatpak module - dwarffortress.enable = false; + # discordChromium.enable = false; + # discordElectron.enable = false; # This is the nixpkgs version, prefer the one from flatpak module + # dwarffortress.enable = false; steam = { enable = true; protonGE = true; # TODO: Using protonup-qt now gamescope = true; adwaita = true; + protonup = true; }; }; }; diff --git a/home/modules/flatpak.nix b/home/modules/flatpak.nix index 83a4add7..85e70ca2 100644 --- a/home/modules/flatpak.nix +++ b/home/modules/flatpak.nix @@ -28,6 +28,9 @@ with mylib.modules; spotify.enable = mkEnableOpt "Spotify"; flatseal.enable = mkEnableOpt "Flatseal"; bottles.enable = mkEnableOpt "Bottles"; + obsidian.enable = mkEnableOpt "Obsidian"; + jabref.enable = mkEnableOpt "Jabref"; + # xwaylandvideobridge = mkEnableOpt "XWayland Video Bridge"; # TODO # This is mainly used by other modules to allow them to use flatpak packages extraInstall = mkOption { @@ -149,6 +152,8 @@ with mylib.modules; (optionals cfg.spotify.enable ["com.spotify.Client"]) (optionals cfg.flatseal.enable ["com.github.tchx84.Flatseal"]) (optionals cfg.bottles.enable ["com.usebottles.bottles"]) + (optionals cfg.obsidian.enable ["md.obsidian.Obsidian"]) + (optionals cfg.jabref.enable ["org.jabref.Jabref"]) cfg.extraInstall ]; @@ -168,6 +173,8 @@ with mylib.modules; (optionals (!cfg.spotify.enable) ["com.spotify.Client"]) (optionals (!cfg.flatseal.enable) ["com.github.tchx84.Flatseal"]) (optionals (!cfg.bottles.enable) ["com.usebottles.bottles"]) + (optionals (!cfg.obsidian.enable) ["md.obsidian.Obsidian"]) + (optionals (!cfg.jabref.enable) ["org.jabref.Jabref"]) # Remove only the flatpaks that are not present in extraInstall (without cfg.extraRemove cfg.extraInstall) ]; diff --git a/home/modules/gaming.nix b/home/modules/gaming.nix index cfa90a13..12ce9b5d 100644 --- a/home/modules/gaming.nix +++ b/home/modules/gaming.nix @@ -22,17 +22,18 @@ in { options.modules.gaming = { enable = mkEnableOpt "Gaming module"; - discordElectron.enable = mkEnableOpt "Discord (Electron) (nixpkgs)"; - discordChromium.enable = mkEnableOpt "Discord (Chromium)"; + # discordElectron.enable = mkEnableOpt "Discord (Electron) (nixpkgs)"; + # discordChromium.enable = mkEnableOpt "Discord (Chromium)"; prism.enable = mkEnableOpt "PrismLauncher for Minecraft (flatpak)"; bottles.enable = mkEnableOpt "Bottles (flatpak)"; - dwarffortress.enable = mkEnableOpt "Dwarf Fortress"; + # dwarffortress.enable = mkEnableOpt "Dwarf Fortress"; steam = { enable = mkEnableOpt "Steam (flatpak)"; protonGE = mkBoolOpt false "Enable Steam Proton GloriousEggroll runner (flatpak)"; gamescope = mkBoolOpt false "Enable the gamescope micro compositor (flatpak)"; adwaita = mkBoolOpt false "Enable the adwaita-for-steam skin"; + protonup = mkBoolOpt false "Enable ProtonUP-QT"; }; }; @@ -63,16 +64,16 @@ in { ] # TODO: Extra config (extensions etc) in chromium module - (optionals cfg.discordChromium.enable [chromium]) + # (optionals cfg.discordChromium.enable [chromium]) # Prefer flatpak version as nixpkgs version isn't always updated in time - (optionals cfg.discordElectron.enable [discord]) + # (optionals cfg.discordElectron.enable [discord]) (optionals cfg.steam.adwaita [adwaita-for-steam]) # Prefer flatpak version as this one doesn't find the STEAM_DIR automatically # (optionals cfg.steam.enable [ protontricks ]) - (optionals cfg.dwarffortress.enable [dwarf-fortress-packages.dwarf-fortress-full]) + # (optionals cfg.dwarffortress.enable [dwarf-fortress-packages.dwarf-fortress-full]) ]; # This doesn't work because steam doesn't detect symlinked skins, files have to be copied @@ -110,17 +111,18 @@ in { }) ]; - xdg.desktopEntries.discordChromium = mkIf cfg.discordChromium.enable { - name = "Discord (Chromium)"; - genericName = "Online voice chat"; - icon = "discord"; - exec = "chromium --new-window discord.com/app"; - terminal = false; - categories = ["Network" "Chat"]; - }; + # xdg.desktopEntries.discordChromium = mkIf cfg.discordChromium.enable { + # name = "Discord (Chromium)"; + # genericName = "Online voice chat"; + # icon = "discord"; + # exec = "chromium --new-window discord.com/app"; + # terminal = false; + # categories = ["Network" "Chat"]; + # }; + # TODO: Remove the bottles option from the gaming module (move it to the flatpak module) # NOTE: Important to not disable this option if another module enables it - modules.flatpak.bottles.enable = mkIf cfg.bottles.enable true; + # modules.flatpak.bottles.enable = mkIf cfg.bottles.enable true; modules.flatpak.extraOverride = [ # Allow Bottles to manage proton prefixes @@ -157,6 +159,7 @@ in { "net.davidotek.pupgui2" ]) (optionals (cfg.steam.enable && cfg.steam.gamescope) ["com.valvesoftware.Steam.Utility.gamescope"]) + (optionals (cfg.steam.enable && cfg.steam.protonup) ["net.davidotek.pupgui2"]) (optionals cfg.prism.enable ["org.prismlauncher.PrismLauncher"]) ]; @@ -173,6 +176,7 @@ in { "net.davidotek.pupgui2" ]) (optionals (!cfg.steam.enable || !cfg.steam.gamescope) ["com.valvesoftware.Steam.Utility.gamescope"]) + (optionals (!cfg.steam.enable || !cfg.steam.protonup) ["net.davidotek.pupgui2"]) (optionals (!cfg.prism.enable) ["org.prismlauncher.PrismLauncher"]) ]; };