From e4ac7ae27e81e5e778f85015425c2f6096289969 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Sun, 23 Mar 2025 00:53:49 +0100 Subject: [PATCH] starsector: init and compatability fix --- modules/nixos/apps/starsector/default.nix | 23 ++++++++++++++++++++++ overlays/starsector/default.nix | 8 ++++++++ systems/x86_64-linux/yggdrasil/default.nix | 1 + 3 files changed, 32 insertions(+) create mode 100644 modules/nixos/apps/starsector/default.nix create mode 100644 overlays/starsector/default.nix diff --git a/modules/nixos/apps/starsector/default.nix b/modules/nixos/apps/starsector/default.nix new file mode 100644 index 0000000..4cab34d --- /dev/null +++ b/modules/nixos/apps/starsector/default.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + namespace, + options, + pkgs, + ... +}: +let + inherit (lib) mkIf mkEnableOption; + cfg = config.${namespace}.apps.starsector; +in +{ + options.${namespace}.apps.starsector = { + enable = mkEnableOption "Whether or not to enable the game starsector."; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + starsector + ]; + }; +} diff --git a/overlays/starsector/default.nix b/overlays/starsector/default.nix new file mode 100644 index 0000000..bf808a5 --- /dev/null +++ b/overlays/starsector/default.nix @@ -0,0 +1,8 @@ +{ ... }: +final: prev: { + starsector = prev.starsector.overrideAttrs (prevAttrs: { + postInstall = '' + wrapProgram $out/bin/starsector --set __GL_THREADED_OPTIMIZATIONS 0 + ''; + }); +} diff --git a/systems/x86_64-linux/yggdrasil/default.nix b/systems/x86_64-linux/yggdrasil/default.nix index d9424a7..e6f5d74 100644 --- a/systems/x86_64-linux/yggdrasil/default.nix +++ b/systems/x86_64-linux/yggdrasil/default.nix @@ -64,6 +64,7 @@ in _1password = enabled; obs-studio = enabled; cli-apps.helix = enabled; + starsector = enabled; }; desktop.hyprland = {