From cfbb434bd41d223fe85c58abe4ec60b46ef571af Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Tue, 2 Jun 2026 14:05:37 +0300 Subject: [PATCH] gaming: declarative Flatpak via nix-flatpak (Bolt, Sober), Heroic + Proton-GE Add nix-flatpak flake input and modules/gaming.nix managing Flatpak remotes/packages declaratively: Bolt (Jagex launcher for RS3/OSRS) and Sober (Roblox). Add Heroic and hyperplay-ext, plus Proton-GE for Steam. Drops the old imperative runescape-launcher. --- configuration.nix | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 2 ++ modules/gaming.nix | 26 ++++++++++++++++++++++++++ modules/packages.nix | 4 ++++ 5 files changed, 50 insertions(+) create mode 100644 modules/gaming.nix diff --git a/configuration.nix b/configuration.nix index 326ac2e..b7f757f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -17,6 +17,7 @@ ./modules/security.nix ./modules/power.nix ./modules/xray.nix + ./modules/gaming.nix ]; # This value determines the NixOS release from which the default diff --git a/flake.lock b/flake.lock index 6fa2f65..181e46c 100644 --- a/flake.lock +++ b/flake.lock @@ -98,6 +98,22 @@ "type": "github" } }, + "nix-flatpak": { + "locked": { + "lastModified": 1767983141, + "narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "440818969ac2cbd77bfe025e884d0aa528991374", + "type": "github" + }, + "original": { + "owner": "gmodena", + "ref": "latest", + "repo": "nix-flatpak", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1776877367, @@ -141,6 +157,7 @@ "inputs": { "anotherim": "anotherim", "lanzaboote": "lanzaboote", + "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", "sops-nix": "sops-nix" } diff --git a/flake.nix b/flake.nix index fcf14e1..daa1e60 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ url = "git+https://dev.narayana.im/anotherim/anotherim-desktop.git?ref=dev"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest"; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -24,6 +25,7 @@ modules = [ inputs.lanzaboote.nixosModules.lanzaboote inputs.sops-nix.nixosModules.sops + inputs.nix-flatpak.nixosModules.nix-flatpak ./configuration.nix ]; }; diff --git a/modules/gaming.nix b/modules/gaming.nix new file mode 100644 index 0000000..8432fd3 --- /dev/null +++ b/modules/gaming.nix @@ -0,0 +1,26 @@ +# Gaming-related configuration +# Flatpak is managed declaratively via nix-flatpak (see flake.nix input). +{ config, pkgs, lib, ... }: + +{ + # Proton-GE for Steam (better Jagex Launcher compatibility than stock Proton). + # Steam itself is enabled in modules/programs.nix. + programs.steam.extraCompatPackages = [ pkgs.proton-ge-bin ]; + + services.flatpak = { + enable = true; + remotes = [ + { name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; } + ]; + packages = [ + # Bolt: Jagex-account launcher for RuneScape 3 (NXT) and OSRS / RuneLite. + { appId = "com.adamcake.Bolt"; origin = "flathub"; } + # Sober: Roblox Player runtime (Android build via Flatpak) — no native Linux client. + { appId = "org.vinegarhq.Sober"; origin = "flathub"; } + ]; + update.auto = { + enable = true; + onCalendar = "weekly"; + }; + }; +} diff --git a/modules/packages.nix b/modules/packages.nix index 0c3e51c..34a9e3a 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -14,6 +14,7 @@ "terraform" "packer" "obsidian" + "hyperplay-ext" ]; # List packages installed in system profile. @@ -66,6 +67,9 @@ obs-studio inputs.anotherim.packages.${pkgs.system}.default + # Gaming + heroic + # Development nodejs_20 gnupg