Add the rpcs3 config.yml file.

This commit is contained in:
Tom Alexander
2025-05-26 14:12:49 -04:00
parent daf35778c5
commit 5af4a95940
8 changed files with 122 additions and 2 deletions

View File

@@ -5,6 +5,14 @@
...
}:
let
rpcs3_config_yaml = (
pkgs.writeTextFile {
name = "config.yml";
text = lib.generators.toYAML { } config.me.rpcs3.config;
}
);
in
{
imports = [ ];
@@ -15,6 +23,29 @@
example = true;
description = "Whether we want to install rpcs3.";
};
rpcs3.config = lib.mkOption {
type = lib.types.nullOr lib.types.attrs;
default = {
VFS = {
"Enable /host_root/" = false;
};
Video = {
"Write Color Buffers" = false;
VSync = true;
"Performance Overlay" = {
Enabled = true;
};
};
Miscellaneous = {
"Pause emulation on RPCS3 focus loss" = true;
"Start games in fullscreen mode" = true;
"Pause Emulation During Home Menu" = true;
};
};
example = null;
description = "RPCS3's config.yml in nix form.";
};
};
config = lib.mkIf config.me.rpcs3.enable (
@@ -39,8 +70,21 @@
}
];
# .config/rpcs3/config.yml
# .config/rpcs3/GuiConfigs/CurrentSettings.ini
me.rpcs3.config.Core."Use LLVM CPU" =
lib.mkIf (config.me.optimizations.enable) config.me.optimizations.arch;
home-manager.users.talexander =
{ pkgs, ... }:
{
home.file.".config/rpcs3/config.yml" = lib.mkIf (config.me.rpcs3.config != null) {
source = rpcs3_config_yaml;
};
home.file.".config/rpcs3/GuiConfigs/CurrentSettings.ini" = {
source = ./files/CurrentSettings.ini;
};
};
# TODO?: .config/rpcs3/GuiConfigs/CurrentSettings.ini
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
@@ -84,6 +128,13 @@
group = "talexander";
mode = "0755";
}
{
# Controller config.
directory = ".config/rpcs3/input_configs";
user = "talexander";
group = "talexander";
mode = "0755";
}
];
};
};