diff --git a/nixcfgs/users/js0ny/packages/gaming.nix b/nixcfgs/users/js0ny/packages/gaming.nix index 4d4688d..42da3ce 100644 --- a/nixcfgs/users/js0ny/packages/gaming.nix +++ b/nixcfgs/users/js0ny/packages/gaming.nix @@ -118,12 +118,10 @@ in { noname steamcmd - - # Celeste mod manager (for Steam version) - (olympus.override { celesteWrapper = "steam-run"; }) ]; imports = [ ../programs/retroarch.nix + ../programs/celeste paradoxLauncherUserSettings victoria3Settings pdxSdkSettingsEU5 diff --git a/nixcfgs/users/js0ny/programs/celeste/default.nix b/nixcfgs/users/js0ny/programs/celeste/default.nix new file mode 100644 index 0000000..0cf5f21 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/celeste/default.nix @@ -0,0 +1,11 @@ +{...}: { + imports = [ + ./lib.nix + ]; + programs.celeste = { + enable = true; + withSteam = true; + withOlympus = true; + settingsFile = ./settings.celeste; + }; +} diff --git a/nixcfgs/users/js0ny/programs/celeste/lib.nix b/nixcfgs/users/js0ny/programs/celeste/lib.nix new file mode 100644 index 0000000..a5e07cd --- /dev/null +++ b/nixcfgs/users/js0ny/programs/celeste/lib.nix @@ -0,0 +1,94 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.programs.celeste; +in { + options.programs.celeste = { + enable = mkEnableOption "Celeste"; + + withOlympus = mkOption { + type = types.bool; + default = false; + description = "Whether to include the Olympus mod manager."; + }; + + withSteam = mkOption { + type = types.bool; + default = true; + description = "Whether the game is installed via Steam (affects mod manager configuration)."; + }; + + withEverest = mkOption { + type = types.bool; + default = false; + description = '' + Whether to install Everest mod loader. + Only applicable when using the celestegame (itch.io) package. + ''; + }; + + writableDir = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Writable directory for Everest mods and logs. + Required when using celestegame with Everest, since the Nix store is read-only. + Example: "/home/user/Games/Celeste/writable" + ''; + }; + + gameDir = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Path where a symbolic link to the Celeste installation will be created. + Useful for Olympus to discover the celestegame installation. + Example: "/home/user/Games/Celeste/game" + ''; + }; + + settingsFile = mkOption { + type = types.nullOr types.path; + default = null; + description = '' + Path to the Celeste settings XML file in the dotfiles repository. + Will be symlinked to ~/.local/share/Celeste/Backups/settings.celeste + via mkOutOfStoreSymlink (out-of-store so the file remains mutable). + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = + # Olympus mod manager + (optional cfg.withOlympus ( + if cfg.withSteam + then pkgs.olympus.override {celesteWrapper = "steam-run";} + else + ( + if cfg.gameDir != null + then pkgs.olympus.override {finderHints = cfg.gameDir;} + else pkgs.olympus + ) + )) + # celestegame (itch.io DRM-free version) + ++ (optional (!cfg.withSteam) ( + pkgs.celestegame.override ( + {} + // (optionalAttrs cfg.withEverest {withEverest = true;}) + // (optionalAttrs (cfg.writableDir != null) {writableDir = cfg.writableDir;}) + // (optionalAttrs (cfg.gameDir != null) {gameDir = cfg.gameDir;}) + ) + )); + + # Symlink settings.celeste from dotfiles repo + home.file = mkIf (cfg.settingsFile != null) { + ".local/share/Celeste/Backups/settings.celeste".source = + config.lib.file.mkOutOfStoreSymlink cfg.settingsFile; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/celeste/settings.celeste b/nixcfgs/users/js0ny/programs/celeste/settings.celeste new file mode 100644 index 0000000..ea53cd2 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/celeste/settings.celeste @@ -0,0 +1,222 @@ + + + 1.4.0.0 + + true + 6 + 0 + true + false + false + true + Hold + Press + 10 + 10 + File + 0 + schinese + false + false + true + + + Left + + + LeftThumbstickLeft + DPadLeft + + + + + Right + + + LeftThumbstickRight + DPadRight + + + + + Down + + + LeftThumbstickDown + DPadDown + + + + + Up + + + LeftThumbstickUp + DPadUp + + + + + Left + + + LeftThumbstickLeft + DPadLeft + + + + + Right + + + LeftThumbstickRight + DPadRight + + + + + Down + + + LeftThumbstickDown + DPadDown + + + + + Up + + + LeftThumbstickUp + DPadUp + + + + + Z + V + LeftShift + + + LeftTrigger + RightTrigger + LeftShoulder + RightShoulder + + + + + C + + + A + Y + + + + + X + + + X + B + + + + + OemQuestion + + + B + + + + + Enter + + + Start + + + + + C + + + A + + + + + X + Back + + + B + X + + + + + Tab + + + LeftTrigger + + + + + R + + + + + + S + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + + \ No newline at end of file