Compare commits

..

No commits in common. "996cb27a89e3b940ba1c8a40d0a310dd845e991e" and "1866cf62901ec0ed620821cd2ca0df447cd56c2b" have entirely different histories.

12 changed files with 96 additions and 390 deletions

View File

@ -32,7 +32,6 @@
./roles/graphics
./roles/hydra
./roles/iso
./roles/iso_mount
./roles/kanshi
./roles/kodi
./roles/kubernetes
@ -50,7 +49,6 @@
./roles/python
./roles/qemu
./roles/reset
./roles/rpcs3
./roles/rust
./roles/shikane
./roles/shipwright

View File

@ -75,7 +75,6 @@
me.gpg.enable = true;
me.graphical = true;
me.graphics_card_type = "amd";
me.iso_mount.enable = true;
me.kanshi.enable = false;
me.kubernetes.enable = true;
me.latex.enable = true;
@ -86,7 +85,6 @@
me.pcsx2.enable = true;
me.python.enable = true;
me.qemu.enable = true;
me.rpcs3.enable = true;
me.rust.enable = true;
me.shikane.enable = true;
me.sops.enable = true;

View File

@ -13,7 +13,6 @@
./wifi.nix
];
config = {
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
networking.hostId = "47ee7d7c";
@ -50,9 +49,6 @@
# Enable TRIM
# services.fstrim.enable = lib.mkDefault true;
# RPCS3 has difficulty with znver5
me.rpcs3.config.Core."Use LLVM CPU" = "znver4";
me.alacritty.enable = true;
me.ansible.enable = true;
me.ares.enable = true;
@ -70,7 +66,6 @@
me.gpg.enable = true;
me.graphical = true;
me.graphics_card_type = "amd";
me.iso_mount.enable = true;
me.kanshi.enable = false;
me.kubernetes.enable = true;
me.latex.enable = true;
@ -82,7 +77,6 @@
me.pcsx2.enable = true;
me.python.enable = true;
me.qemu.enable = true;
me.rpcs3.enable = true;
me.rust.enable = true;
me.shikane.enable = true;
me.sops.enable = true;
@ -109,5 +103,4 @@
me.sm64ex.enable = true;
me.shipwright.enable = true;
me.ship2harkinian.enable = true;
};
}

View File

@ -1,45 +0,0 @@
{
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
];
}
]
);
}

View File

@ -1,8 +0,0 @@
#!/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 "${@}"

View File

@ -1,8 +0,0 @@
#!/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 "${@}"

View File

@ -1,170 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
rpcs3_config_yaml = settingsFormat.generate "config.yml" config.me.rpcs3.config;
settingsFormat = pkgs.formats.yaml { };
in
{
imports = [ ];
options.me = {
rpcs3.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install rpcs3.";
};
rpcs3.config = lib.mkOption rec {
apply = lib.recursiveUpdate default;
inherit (settingsFormat) type;
default = {
Core = {
"Use LLVM CPU" = lib.mkIf (config.me.optimizations.enable) config.me.optimizations.arch;
};
VFS = {
"Enable /host_root/" = false;
};
Video = {
"Write Color Buffers" = true;
VSync = true;
"Performance Overlay" = {
Enabled = false;
};
};
Miscellaneous = {
"Pause emulation on RPCS3 focus loss" = true;
"Start games in fullscreen mode" = true;
"Pause Emulation During Home Menu" = false; # true makes the home menu slow
};
};
example = null;
description = "RPCS3's config.yml in nix form.";
};
};
config = lib.mkIf config.me.rpcs3.enable (
lib.mkMerge [
(lib.mkIf config.me.graphical {
environment.systemPackages = with pkgs; [
rpcs3
];
security.pam.loginLimits = [
{
domain = "@wheel";
item = "memlock";
type = "hard";
value = "unlimited";
}
{
domain = "@wheel";
item = "memlock";
type = "soft";
value = "unlimited";
}
];
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;
};
};
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
users.talexander = {
directories = [
{
# Location of ROMs.
directory = ".config/rpcs3/games";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
directory = ".config/rpcs3/dev_hdd0";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
directory = ".config/rpcs3/dev_hdd1";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
directory = ".config/rpcs3/savestates";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
directory = ".config/rpcs3/dev_usb000";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
# Seems to be where the firmware is installed.
directory = ".config/rpcs3/dev_flash";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
# Controller config.
directory = ".config/rpcs3/input_configs";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
# Game icons.
directory = ".config/rpcs3/Icons";
user = "talexander";
group = "talexander";
mode = "0755";
}
];
files = [
{
# play times and recently played
file = ".config/rpcs3/GuiConfigs/persistent_settings.dat";
parentDirectory = {
mode = "0755";
};
}
];
};
};
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
users.talexander = {
directories = [
{
# Game saves
directory = ".cache/rpcs3";
user = "talexander";
group = "talexander";
mode = "0755";
}
];
};
};
})
]
);
}

View File

@ -1,5 +0,0 @@
[Meta]
currentStylesheet=Darker Style by TheMitoSan
[main_window]
infoBoxEnabledWelcome=false

View File

@ -10,9 +10,6 @@ let
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib"
exec ${pkgs.rpcs3}/bin/rpcs3 "''${@}"
'';
rpcs3_config_yaml = settingsFormat.generate "config.yml" config.me.rpcs3.config;
settingsFormat = pkgs.formats.yaml { };
in
{
imports = [ ];
@ -24,33 +21,6 @@ in
example = true;
description = "Whether we want to install rpcs3.";
};
rpcs3.config = lib.mkOption rec {
apply = lib.recursiveUpdate default;
inherit (settingsFormat) type;
default = {
Core = {
"Use LLVM CPU" = "znver2";
};
VFS = {
"Enable /host_root/" = false;
};
Video = {
"Write Color Buffers" = true;
VSync = true;
"Performance Overlay" = {
Enabled = false;
};
};
Miscellaneous = {
"Pause emulation on RPCS3 focus loss" = true;
"Start games in fullscreen mode" = true;
"Pause Emulation During Home Menu" = false; # true makes the home menu slow
};
};
example = null;
description = "RPCS3's config.yml in nix form.";
};
};
config = lib.mkIf config.me.rpcs3.enable (
@ -61,25 +31,15 @@ in
steam_rpcs3
];
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;
};
# .config/rpcs3/config.yml
# .config/rpcs3/GuiConfigs/CurrentSettings.ini
me.persist.directories = [
".config/rpcs3/games" # Location of ROMs.
".config/rpcs3/dev_hdd0"
".config/rpcs3/dev_hdd1"
".config/rpcs3/savestates"
".config/rpcs3/dev_usb000"
".config/rpcs3/dev_flash" # Seems to be where the firmware is installed.
".config/rpcs3/input_configs" # Controller config.
".config/rpcs3/Icons" # Game icons.
];
me.persist.files = [
".config/rpcs3/GuiConfigs/persistent_settings.dat" # play times and recently played
];
me.state.directories = [ ".cache/rpcs3" ];

View File

@ -1,5 +0,0 @@
[Meta]
currentStylesheet=Darker Style by TheMitoSan
[main_window]
infoBoxEnabledWelcome=false

View File

@ -24,12 +24,21 @@ in
config = lib.mkIf config.me.steam_rom_manager.enable (
lib.mkMerge [
(lib.mkIf config.me.graphical {
home.packages = [
home.packages = with pkgs; [
package
];
me.persist.directories = [ ".config/steam-rom-manager/userData" ];
home.persistence."/home/deck/.persist" = {
directories = [
{
directory = ".config/steam-rom-manager/userData";
method = "symlink";
}
];
};
# TODO: Install a fully configured /home/deck/.persist/.config/steam-rom-manager/userData/userConfigurations.json (which contains the parser definitions) and /home/deck/.persist/.config/steam-rom-manager/userData/userSettings.json (which contains the applications settings like steam directory).
# TODO: Maybe only persist /home/deck/.persist/.config/steam-rom-manager/userData/artworkBackups and /home/deck/.persist/.config/steam-rom-manager/userData/artworkCache.json after the parser config is being installed.

View File

@ -16,12 +16,6 @@
example = [ ".local/share/dolphin-emu/Wii" ];
description = "List of folders relative to the home directory to persist.";
};
persist.files = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ ".local/share/foo.sqlite3" ];
description = "List of files relative to the home directory to persist.";
};
state.directories = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
@ -56,11 +50,6 @@
);
};
})
(lib.mkIf (config.me.persist.files != [ ]) {
home.persistence."/home/deck/.persist" = {
files = config.me.persist.files;
};
})
(lib.mkIf (config.me.state.directories != [ ]) {
home.persistence."/home/deck/.state" = {
directories = (