cleanup
This commit is contained in:
@@ -3,10 +3,9 @@ let
|
||||
shellAliases = {
|
||||
ll = "ls -alh";
|
||||
update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.18";
|
||||
update-switch = "sudo nixos-rebuild switch --max-jobs 10 --build-host admin@10.0.1.18";
|
||||
update-flake = "sudo nix flake update ~/nix-config";
|
||||
update-nas = "nixos-rebuild switch --use-remote-sudo --target-host admin@10.0.1.18 --build-host admin@10.0.1.18 --flake ~/nix-config#jallen-nas";
|
||||
nas-ssh = "kitten ssh admin@10.0.1.18";
|
||||
update-switch = "sudo nixos-rebuild switch --max-jobs 10";
|
||||
update-flake = "nix flake update /etch/nixos";
|
||||
nas-ssh = "ssh admin@10.0.1.18";
|
||||
ducks = "du -cksh * | sort -hr | head -n 15";
|
||||
};
|
||||
|
||||
@@ -22,40 +21,6 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./steam-rom-manager.nix
|
||||
];
|
||||
|
||||
programs.steam-rom-manager = {
|
||||
enable = true;
|
||||
steamUsername = "mjallen18";
|
||||
|
||||
# Optional: override default paths if needed
|
||||
romsDirectory = "/home/deck/Emulation/roms";
|
||||
steamDirectory = "/home/deck/.local/share/Steam";
|
||||
|
||||
emulators = {
|
||||
ryujinx = {
|
||||
enable = true;
|
||||
package = pkgs.ryujinx-greemdev;
|
||||
};
|
||||
|
||||
dolphin-gamecube = {
|
||||
enable = true;
|
||||
package = pkgs.dolphin-emu;
|
||||
romFolder = "gc";
|
||||
binaryName = "dolphin-emu";
|
||||
fileTypes = [ ".iso" ".ISO" ".gcm" ".GCM" ".ciso" ".CISO" "rvz" ];
|
||||
extraArgs = "-b -e \"\${filePath}\"";
|
||||
};
|
||||
|
||||
pcsx2 = {
|
||||
enable = true;
|
||||
package = pkgs.pcsx2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.username = "deck";
|
||||
home.homeDirectory = "/home/deck";
|
||||
home.stateVersion = "23.11";
|
||||
@@ -88,6 +53,31 @@ in
|
||||
userEmail = "matt.l.jallen@gmail.com";
|
||||
aliases = gitAliases;
|
||||
};
|
||||
|
||||
programs.steam-rom-manager = {
|
||||
enable = true;
|
||||
steamUsername = "mjallen18";
|
||||
|
||||
# Optional: override default paths if needed
|
||||
romsDirectory = "/home/deck/Emulation/roms";
|
||||
steamDirectory = "/home/deck/.local/share/Steam";
|
||||
|
||||
emulators = {
|
||||
ryujinx.enable = true;
|
||||
|
||||
dolphin-gamecube = {
|
||||
enable = true;
|
||||
package = pkgs.dolphin-emu;
|
||||
romFolder = "gc";
|
||||
binaryName = "dolphin-emu";
|
||||
fileTypes = [ ".iso" ".ISO" ".gcm" ".GCM" ".ciso" ".CISO" "rvz" ];
|
||||
extraArgs = "-b -e \"\${filePath}\"";
|
||||
};
|
||||
|
||||
pcsx2.enable = true;
|
||||
mgba.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.command-not-found.enable = true;
|
||||
|
||||
|
||||
@@ -6,48 +6,129 @@ with lib;
|
||||
let
|
||||
cfg = config.programs.steam-rom-manager;
|
||||
|
||||
# Function to find the main binary in a package
|
||||
findMainBinary = pkg: name:
|
||||
let
|
||||
# First try to find a binary that matches the package name
|
||||
pkgName = pkg.pname or (builtins.parseDrvName pkg.name).name;
|
||||
# binPath = "${pkg}/bin/${pkgName}";
|
||||
|
||||
# Common binary name variations
|
||||
commonVariants = [
|
||||
pkgName # e.g., "citra"
|
||||
"${pkgName}-qt" # e.g., "citra-qt"
|
||||
"${pkgName}-gtk" # e.g., "citra-gtk"
|
||||
"${pkgName}-emu" # e.g., "dolphin-emu"
|
||||
];
|
||||
|
||||
# Check if any of the common variants exist
|
||||
existingVariant = findFirst
|
||||
(variant: builtins.pathExists "${pkg}/bin/${variant}")
|
||||
null
|
||||
commonVariants;
|
||||
in
|
||||
# Use the override if provided, otherwise try to find the binary
|
||||
if name != ""
|
||||
then name
|
||||
else if existingVariant != null
|
||||
then existingVariant
|
||||
else pkgName; # Fallback to package name
|
||||
|
||||
# Common emulator configurations
|
||||
commonEmulatorConfigs = {
|
||||
ryujinx = {
|
||||
romFolder = "switch";
|
||||
binaryName = "Ryujinx";
|
||||
fileTypes = [ ".nca" ".NCA" ".nro" ".NRO" ".nso" ".NSO" ".nsp" ".NSP" ".xci" ".XCI" ];
|
||||
};
|
||||
yuzu = {
|
||||
romFolder = "switch";
|
||||
binaryName = "yuzu";
|
||||
fileTypes = [ ".nsp" ".NSP" ".xci" ".XCI" ];
|
||||
};
|
||||
pcsx2 = {
|
||||
romFolder = "ps2";
|
||||
binaryName = "pcsx2-qt";
|
||||
fileTypes = [ ".iso" ".ISO" ".bin" ".BIN" ".chd" ".CHD" ];
|
||||
};
|
||||
rpcs3 = {
|
||||
romFolder = "ps3";
|
||||
binaryName = "rpcs3";
|
||||
fileTypes = [ ".iso" ".ISO" ".bin" ".BIN" ".pkg" ".PKG" ];
|
||||
};
|
||||
dolphin-emu = {
|
||||
romFolder = "gc";
|
||||
binaryName = "dolphin-emu";
|
||||
fileTypes = [ ".iso" ".ISO" ".gcm" ".GCM" ".ciso" ".CISO" ];
|
||||
};
|
||||
duckstation = {
|
||||
romFolder = "psx";
|
||||
binaryName = "duckstation-qt";
|
||||
fileTypes = [ ".iso" ".ISO" ".bin" ".BIN" ".chd" ".CHD" ".pbp" ".PBP" ];
|
||||
};
|
||||
melonDS = {
|
||||
romFolder = "nds";
|
||||
binaryName = "melonDS";
|
||||
fileTypes = [ ".nds" ".NDS" ];
|
||||
};
|
||||
cemu = {
|
||||
romFolder = "wiiu";
|
||||
binaryName = "cemu";
|
||||
fileTypes = [ ".wud" ".WUD" ".wux" ".WUX" ".rpx" ".RPX" ];
|
||||
};
|
||||
# Added default configurations
|
||||
xemu = {
|
||||
romFolder = "xbox";
|
||||
fileTypes = [ ".iso" ".ISO" ];
|
||||
};
|
||||
xenia = {
|
||||
romFolder = "xbox360";
|
||||
fileTypes = [ ".iso" ".ISO" ".xex" ".XEX" ];
|
||||
};
|
||||
ppsspp = {
|
||||
romFolder = "psp";
|
||||
fileTypes = [ ".iso" ".ISO" ".cso" ".CSO" ".pbp" ".PBP" ];
|
||||
};
|
||||
vita3k = {
|
||||
romFolder = "psvita";
|
||||
fileTypes = [ ".vpk" ".VPK" ];
|
||||
};
|
||||
mame = {
|
||||
romFolder = "arcade";
|
||||
fileTypes = [ ".zip" ".ZIP" ".7z" ".7Z" ];
|
||||
};
|
||||
dosbox = {
|
||||
romFolder = "dos";
|
||||
fileTypes = [ ".exe" ".EXE" ".bat" ".BAT" ".com" ".COM" ];
|
||||
};
|
||||
pcem = {
|
||||
romFolder = "pcem";
|
||||
fileTypes = [ ".img" ".IMG" ".ima" ".IMA" ];
|
||||
};
|
||||
snes9x = {
|
||||
romFolder = "snes";
|
||||
fileTypes = [ ".smc" ".SMC" ".sfc" ".SFC" ".fig" ".FIG" ];
|
||||
};
|
||||
mgba = {
|
||||
romFolder = "gba";
|
||||
fileTypes = [ ".gba" ".GBA" ];
|
||||
};
|
||||
mupen64plus = {
|
||||
romFolder = "n64";
|
||||
fileTypes = [ ".n64" ".N64" ".v64" ".V64" ".z64" ".Z64" ];
|
||||
};
|
||||
retroarch = {
|
||||
romFolder = "retroarch";
|
||||
fileTypes = [ ".zip" ".ZIP" ".7z" ".7Z" ".iso" ".ISO" ".bin" ".BIN" ".chd" ".CHD" ];
|
||||
};
|
||||
dolphin-triforce = {
|
||||
romFolder = "triforce";
|
||||
fileTypes = [ ".iso" ".ISO" ".gcm" ".GCM" ];
|
||||
};
|
||||
flycast = {
|
||||
romFolder = "dreamcast";
|
||||
fileTypes = [ ".gdi" ".GDI" ".cdi" ".CDI" ".chd" ".CHD" ];
|
||||
};
|
||||
citra = {
|
||||
romFolder = "3ds";
|
||||
fileTypes = [ ".3ds" ".3DS" ".cia" ".CIA" ".cxi" ".CXI" ];
|
||||
};
|
||||
demul = {
|
||||
romFolder = "demul";
|
||||
fileTypes = [ ".gdi" ".GDI" ".cdi" ".CDI" ".chd" ".CHD" ];
|
||||
};
|
||||
};
|
||||
|
||||
getFileTypes = name: emu:
|
||||
@@ -57,6 +138,9 @@ let
|
||||
|
||||
mkParserConfig = name: emu:
|
||||
let
|
||||
# Get the binary name dynamically if not explicitly set
|
||||
binaryName = findMainBinary emu.package emu.binaryName;
|
||||
|
||||
# We create an ordered list of key-value pairs that will maintain the exact order
|
||||
# in the generated JSON output. Each field is documented for clarity.
|
||||
orderedConfig = [
|
||||
@@ -96,7 +180,7 @@ let
|
||||
|
||||
# Executable details
|
||||
{ name = "executable"; value = {
|
||||
path = "${emu.package}/bin/${if emu.binaryName != "" then emu.binaryName else commonEmulatorConfigs.${name}.binaryName}";
|
||||
path = "${emu.package}/bin/${binaryName}";
|
||||
shortcutPassthrough = false;
|
||||
appendArgsToExecutable = true;
|
||||
}; }
|
||||
@@ -250,11 +334,6 @@ in {
|
||||
type = types.package;
|
||||
description = "Emulator package";
|
||||
};
|
||||
binaryName = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = "Name of the emulator binary (defaults to common configuration)";
|
||||
};
|
||||
romFolder = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
|
||||
@@ -141,4 +141,22 @@ in
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
let
|
||||
configLimit = 5;
|
||||
default = "@saved";
|
||||
kernel = pkgs.linuxPackages_latest;
|
||||
kernel = pkgs.linuxPackages_cachyos;
|
||||
in
|
||||
{
|
||||
# Configure bootloader with lanzaboot and secureboot
|
||||
|
||||
@@ -106,6 +106,7 @@ in
|
||||
];
|
||||
|
||||
apps.discover-wrapped.enable = lib.mkDefault false;
|
||||
chaotic.mesa-git.enable = true;
|
||||
|
||||
nix.settings.trusted-users = lib.mkDefault [
|
||||
"root"
|
||||
@@ -182,20 +183,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# borgbackup.jobs.home-matt = {
|
||||
# encryption.mode = "repokey";
|
||||
# encryption.passCommand = "cat /root/borg";
|
||||
# environment.BORG_RSH = "ssh -i /home/matt/.ssh/id_ed25519";
|
||||
# repo = "/media/nas/backup/desktop-nix/borg/home";
|
||||
# compression = "auto,zstd";
|
||||
# inhibitsSleep = true;
|
||||
# paths = "/home/matt";
|
||||
# exclude = [
|
||||
# "/home/matt/Games"
|
||||
# "/home/matt/1TB"
|
||||
# ];
|
||||
# };
|
||||
|
||||
btrfs = {
|
||||
autoScrub.enable = lib.mkDefault true;
|
||||
autoScrub.fileSystems = lib.mkDefault [
|
||||
@@ -313,16 +300,12 @@ in
|
||||
lact
|
||||
memtest86-efi
|
||||
memtest86plus
|
||||
unstable.mesa
|
||||
unstable.driversi686Linux.mesa
|
||||
nano
|
||||
onlyoffice-bin
|
||||
os-prober
|
||||
nil
|
||||
papirus-icon-theme
|
||||
pciutils
|
||||
# python3
|
||||
# python3Packages.requests
|
||||
stable.qemu_full
|
||||
rclone
|
||||
rclone-browser
|
||||
@@ -338,7 +321,6 @@ in
|
||||
vim
|
||||
vulkan-tools
|
||||
wget
|
||||
# winetricks (all versions)
|
||||
winetricks
|
||||
# native wayland support (unstable)
|
||||
wineWowPackages.waylandFull
|
||||
@@ -415,26 +397,7 @@ in
|
||||
enable = true;
|
||||
brscan5.enable = true;
|
||||
dsseries.enable = false;
|
||||
# backends-package = pkgs.brscan5;
|
||||
extraBackends = [ pkgs.brscan5 ];
|
||||
};
|
||||
};
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -56,6 +56,26 @@ in
|
||||
aliases = gitAliases;
|
||||
};
|
||||
|
||||
programs.steam-rom-manager = {
|
||||
enable = true;
|
||||
steamUsername = "matt";
|
||||
|
||||
environmentVariables = {
|
||||
romsDirectory = "/home/matt/Games/roms";
|
||||
steamDirectory = "/home/matt/.local/share/Steam";
|
||||
};
|
||||
|
||||
emulators = {
|
||||
ryujinx = {
|
||||
enable = true;
|
||||
};
|
||||
pcsx2 = {
|
||||
enable = true;
|
||||
};
|
||||
# Add other emulators as needed
|
||||
};
|
||||
};
|
||||
|
||||
programs.command-not-found.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
@@ -144,7 +164,6 @@ in
|
||||
"org/gnome/tweaks".show-extensions-notice = false;
|
||||
"org/gnome/shell".enabled-extensions = [
|
||||
"appindicatorsupport@rgcjonas.gmail.com"
|
||||
# "arcmenu@arcmenu.com"
|
||||
"user-theme@gnome-shell-extensions.gcampax.github.com"
|
||||
"tiling-assistant@leleat-on-github"
|
||||
"dash-to-dock@micxgx.gmail.com"
|
||||
|
||||
@@ -292,22 +292,4 @@ in
|
||||
# tpm.enable = true;
|
||||
# useSecureBoot = true;
|
||||
};
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -104,23 +104,4 @@ in
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user