Add the rpcs3 config.yml file.
This commit is contained in:
parent
daf35778c5
commit
5af4a95940
@ -32,6 +32,7 @@
|
|||||||
./roles/graphics
|
./roles/graphics
|
||||||
./roles/hydra
|
./roles/hydra
|
||||||
./roles/iso
|
./roles/iso
|
||||||
|
./roles/iso_mount
|
||||||
./roles/kanshi
|
./roles/kanshi
|
||||||
./roles/kodi
|
./roles/kodi
|
||||||
./roles/kubernetes
|
./roles/kubernetes
|
||||||
|
@ -75,6 +75,7 @@
|
|||||||
me.gpg.enable = true;
|
me.gpg.enable = true;
|
||||||
me.graphical = true;
|
me.graphical = true;
|
||||||
me.graphics_card_type = "amd";
|
me.graphics_card_type = "amd";
|
||||||
|
me.iso_mount.enable = true;
|
||||||
me.kanshi.enable = false;
|
me.kanshi.enable = false;
|
||||||
me.kubernetes.enable = true;
|
me.kubernetes.enable = true;
|
||||||
me.latex.enable = true;
|
me.latex.enable = true;
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
me.gpg.enable = true;
|
me.gpg.enable = true;
|
||||||
me.graphical = true;
|
me.graphical = true;
|
||||||
me.graphics_card_type = "amd";
|
me.graphics_card_type = "amd";
|
||||||
|
me.iso_mount.enable = true;
|
||||||
me.kanshi.enable = false;
|
me.kanshi.enable = false;
|
||||||
me.kubernetes.enable = true;
|
me.kubernetes.enable = true;
|
||||||
me.latex.enable = true;
|
me.latex.enable = true;
|
||||||
|
45
nix/configuration/roles/iso_mount/default.nix
Normal file
45
nix/configuration/roles/iso_mount/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
iso_mount =
|
||||||
|
(pkgs.writeScriptBin "iso_mount" (builtins.readFile ./files/iso_mount.bash)).overrideAttrs
|
||||||
|
(old: {
|
||||||
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||||
|
|
||||||
|
});
|
||||||
|
iso_unmount =
|
||||||
|
(pkgs.writeScriptBin "iso_unmount" (builtins.readFile ./files/iso_unmount.bash)).overrideAttrs
|
||||||
|
(old: {
|
||||||
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
iso_mount.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install iso_mount.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.iso_mount.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
iso_mount
|
||||||
|
iso_unmount
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
8
nix/configuration/roles/iso_mount/files/iso_mount.bash
Normal file
8
nix/configuration/roles/iso_mount/files/iso_mount.bash
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Mount a full-disk image as a loopback device so you can mount individual partitions from inside of it.
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
exec udisksctl loop-setup -r -f "${@}"
|
8
nix/configuration/roles/iso_mount/files/iso_unmount.bash
Normal file
8
nix/configuration/roles/iso_mount/files/iso_unmount.bash
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Mount a full-disk image as a loopback device so you can mount individual partitions from inside of it.
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
exec udisksctl loop-delete "${@}"
|
@ -5,6 +5,14 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
rpcs3_config_yaml = (
|
||||||
|
pkgs.writeTextFile {
|
||||||
|
name = "config.yml";
|
||||||
|
text = lib.generators.toYAML { } config.me.rpcs3.config;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
@ -15,6 +23,29 @@
|
|||||||
example = true;
|
example = true;
|
||||||
description = "Whether we want to install rpcs3.";
|
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 (
|
config = lib.mkIf config.me.rpcs3.enable (
|
||||||
@ -39,8 +70,21 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
# .config/rpcs3/config.yml
|
me.rpcs3.config.Core."Use LLVM CPU" =
|
||||||
# .config/rpcs3/GuiConfigs/CurrentSettings.ini
|
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) {
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
@ -84,6 +128,13 @@
|
|||||||
group = "talexander";
|
group = "talexander";
|
||||||
mode = "0755";
|
mode = "0755";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
# Controller config.
|
||||||
|
directory = ".config/rpcs3/input_configs";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
5
nix/configuration/roles/rpcs3/files/CurrentSettings.ini
Normal file
5
nix/configuration/roles/rpcs3/files/CurrentSettings.ini
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[Meta]
|
||||||
|
currentStylesheet=Darker Style by TheMitoSan
|
||||||
|
|
||||||
|
[main_window]
|
||||||
|
infoBoxEnabledWelcome=false
|
Loading…
x
Reference in New Issue
Block a user