Compare commits

..

No commits in common. "15c209fdd96c6f0628bfb034a2f318e0edde7d4e" and "2b546300538b6bee3eb888cf2c4eee7e9765f609" have entirely different histories.

11 changed files with 13 additions and 423 deletions

View File

@ -69,7 +69,6 @@
./roles/sops ./roles/sops
./roles/gcloud ./roles/gcloud
./roles/steam_run_free ./roles/steam_run_free
./roles/pcsx2
]; ];
nix.settings.experimental-features = [ nix.settings.experimental-features = [

View File

@ -135,11 +135,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1741955947, "lastModified": 1740432748,
"narHash": "sha256-2lbURKclgKqBNm7hVRtWh0A7NrdsibD0EaWhahUVhhY=", "narHash": "sha256-BCeFtoJ/+LrZc03viRJWHfzAqqG8gPu/ikZeurv05xs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "4e12151c9e014e2449e0beca2c0e9534b96a26b4", "rev": "c12dcc9b61429b2ad437a7d4974399ad8f910319",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -191,11 +191,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1741851582, "lastModified": 1740367490,
"narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -65,7 +65,6 @@
me.lvfs.enable = true; me.lvfs.enable = true;
me.media.enable = true; me.media.enable = true;
me.nix_index.enable = true; me.nix_index.enable = true;
me.pcsx2.enable = true;
me.python.enable = true; me.python.enable = true;
me.qemu.enable = true; me.qemu.enable = true;
me.rust.enable = true; me.rust.enable = true;

View File

@ -22,18 +22,16 @@
"nixos-test" "nixos-test"
]; ];
# Keep ALL dependencies so we can rebuild offline. This DRASTICALLY increase disk usage, but disk space is cheap.
# system.includeBuildDependencies = true;
# nixpkgs.hostPlatform = { # nixpkgs.hostPlatform = {
# gcc.arch = "znver4"; # gcc.arch = "znver4";
# gcc.tune = "znver4"; # gcc.tune = "znver4";
# system = "x86_64-linux"; # system = "x86_64-linux";
# }; # };
nixpkgs.overlays = [ nixpkgs.overlays = [
( (
final: prev: self: super:
let let
optimizeWithFlags = optimizeWithFlags =
pkg: flags: pkg: flags:
@ -64,17 +62,11 @@
HZ_1000 = lib.kernel.no; HZ_1000 = lib.kernel.no;
} }
( (
optimizeWithFlags prev.linux_6_13 [ optimizeWithFlags super.linux_6_12 [
"-march=znver4" "-march=znver4"
"-mtune=znver4" "-mtune=znver4"
] ]
); );
# gsl = prev.gsl.overrideAttrs (old: {
# # gsl tests fails when optimizations are enabled.
# # > FAIL: cholesky_invert unscaled hilbert ( 4, 4)[0,2]: 2.55795384873636067e-13 0
# # > (2.55795384873636067e-13 observed vs 0 expected) [28259614]
# doCheck = false;
# });
} }
) )
]; ];
@ -82,7 +74,7 @@
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_znver4; boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_znver4;
}) })
(lib.mkIf (config.me.buildingIso) { (lib.mkIf (config.me.buildingIso) {
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_13; boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_12;
boot.supportedFilesystems.zfs = true; boot.supportedFilesystems.zfs = true;
}) })
]; ];

View File

@ -9,10 +9,9 @@
imports = [ ]; imports = [ ];
config = { config = {
# Doesn't seem necessary starting with 6.13 environment.loginShellInit = lib.mkIf (!config.me.buildingIso) ''
# environment.loginShellInit = lib.mkIf (!config.me.buildingIso) '' doas iw dev wlan0 set power_save off
# doas iw dev wlan0 set power_save off '';
# '';
# Enable debug logging for ath12k wifi card. # Enable debug logging for ath12k wifi card.
boot.kernelParams = [ boot.kernelParams = [

View File

@ -1,95 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
options.me = {
pcsx2.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install pcsx2.";
};
};
config = lib.mkIf config.me.pcsx2.enable (
lib.mkMerge [
(lib.mkIf config.me.graphical {
environment.systemPackages = with pkgs; [
pcsx2
];
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
users.talexander = {
directories = [
{
# Shaders, games list, and achievement data.
directory = ".config/PCSX2/cache";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
# Save states.
directory = ".config/PCSX2/sstates";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
# Screenshots.
directory = ".config/PCSX2/snaps";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
# Game covers.
directory = ".config/PCSX2/covers";
user = "talexander";
group = "talexander";
mode = "0755";
}
{
# Video recordings.
directory = ".config/PCSX2/videos";
user = "talexander";
group = "talexander";
mode = "0755";
}
];
};
};
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
users.talexander = {
directories = [
{
# Game saves
directory = ".config/PCSX2/memcards";
user = "talexander";
group = "talexander";
mode = "0755";
}
];
};
};
home-manager.users.talexander =
{ pkgs, ... }:
{
home.file.".config/PCSX2/inis/PCSX2.ini" = {
source = ./files/PCSX2.ini;
};
};
})
]
);
}

View File

@ -1,104 +0,0 @@
[UI]
SettingsVersion = 1
InhibitScreensaver = true
ConfirmShutdown = false
StartPaused = false
PauseOnFocusLoss = true
StartFullscreen = true
[Folders]
Bios = ../../persist/games/ps2/bios
Snapshots = snaps
Savestates = sstates
MemoryCards = memcards
Logs = logs
Cheats = cheats
Patches = patches
UserResources = resources
Cache = cache
Textures = textures
InputProfiles = inputprofiles
Videos = videos
[EmuCore/GS]
VsyncEnable = true
# Internal resolution aspect corrected
ScreenshotSize = 1
# webp
ScreenshotFormat = 2
OsdShowFPS = true
# Capture video at internal resolution
VideoCaptureAutoResolution = true
# 2x native resolution
upscale_multiplier = 2
CaptureContainer = mkv
VideoCaptureCodec = av1_vaapi
AudioCaptureCodec = flac
[Filenames]
BIOS = ps2-0230a-20080220.bin
[MemoryCards]
Slot1_Enable = true
Slot1_Filename = Mcd001.ps2
Slot2_Enable = true
Slot2_Filename = Mcd002.ps2
[InputSources]
Keyboard = false
Mouse = false
SDL = true
# Enhanced ps4 and ps5 controller support
SDLControllerEnhancedMode = true
SDLPS5PlayerLED = true
[Pad1]
Type = DualShock2
InvertL = 0
InvertR = 0
Deadzone = 0
AxisScale = 1.33
LargeMotorScale = 1
SmallMotorScale = 1
ButtonDeadzone = 0
PressureModifier = 0.5
Up = SDL-0/DPadUp
Right = SDL-0/DPadRight
Down = SDL-0/DPadDown
Left = SDL-0/DPadLeft
Triangle = SDL-0/Y
Circle = SDL-0/B
Cross = SDL-0/A
Square = SDL-0/X
Select = SDL-0/Back
Start = SDL-0/Start
L1 = SDL-0/LeftShoulder
L2 = SDL-0/+LeftTrigger
R1 = SDL-0/RightShoulder
R2 = SDL-0/+RightTrigger
L3 = SDL-0/LeftStick
R3 = SDL-0/RightStick
LUp = SDL-0/-LeftY
LRight = SDL-0/+LeftX
LDown = SDL-0/+LeftY
LLeft = SDL-0/-LeftX
RUp = SDL-0/-RightY
RRight = SDL-0/+RightX
RDown = SDL-0/+RightY
RLeft = SDL-0/-RightX
Analog = SDL-0/Guide
LargeMotor = SDL-0/LargeMotor
SmallMotor = SDL-0/SmallMotor
[AutoUpdater]
CheckAtStartup = false
[GameList]
RecursivePaths = /home/talexander/persist/games/ps2/roms

View File

@ -9,7 +9,6 @@
imports = [ imports = [
./roles/2ship2harkinian ./roles/2ship2harkinian
./roles/graphics ./roles/graphics
./roles/pcsx2
./roles/shipwright ./roles/shipwright
./roles/sm64ex ./roles/sm64ex
./roles/steam_rom_manager ./roles/steam_rom_manager

View File

@ -10,7 +10,6 @@
config = { config = {
me.graphical = true; me.graphical = true;
me.pcsx2.enable = true;
me.ship2harkinian.enable = true; me.ship2harkinian.enable = true;
me.shipwright.enable = true; me.shipwright.enable = true;
me.sm64ex.enable = true; me.sm64ex.enable = true;

View File

@ -1,94 +0,0 @@
# MANUAL: mkdir -p ~/.persist/.config/PCSX2/memcards ~/.state/.config/PCSX2/cache ~/.state/.config/PCSX2/sstates ~/.state/.config/PCSX2/snaps ~/.state/.config/PCSX2/covers ~/.state/.config/PCSX2/videos
{
config,
lib,
pkgs,
...
}:
let
steam_pcsx2 = pkgs.writeScriptBin "steam_pcsx2" ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib"
exec ${pkgs.pcsx2}/bin/pcsx2-qt
'';
in
{
imports = [ ];
options.me = {
pcsx2.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install pcsx2.";
};
};
config = lib.mkIf config.me.pcsx2.enable (
lib.mkMerge [
(lib.mkIf config.me.graphical {
home.packages = with pkgs; [
pcsx2
steam_pcsx2
];
home.file.".config/PCSX2/inis/PCSX2.ini" = {
source = ./files/PCSX2.ini;
};
home.persistence."/home/deck/.persist" = {
directories = [
{
directory = ".config/PCSX2/memcards";
method = "symlink";
}
];
};
home.persistence."/home/deck/.state" = {
directories = [
{
directory = ".config/PCSX2/cache";
method = "symlink";
}
{
directory = ".config/PCSX2/sstates";
method = "symlink";
}
{
directory = ".config/PCSX2/snaps";
method = "symlink";
}
{
directory = ".config/PCSX2/covers";
method = "symlink";
}
{
directory = ".config/PCSX2/videos";
method = "symlink";
}
];
};
nixpkgs.overlays = [
(final: prev: {
pcsx2 = pkgs.buildEnv {
name = prev.pcsx2.name;
paths = [
(config.lib.nixGL.wrap prev.pcsx2)
];
extraOutputsToInstall = [
"man"
"doc"
"info"
];
# We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them.
postBuild = ''
chmod 0555 $out/share/applications/PCSX2.desktop
'';
};
})
];
})
]
);
}

View File

@ -1,104 +0,0 @@
[UI]
SettingsVersion = 1
InhibitScreensaver = true
ConfirmShutdown = false
StartPaused = false
PauseOnFocusLoss = true
StartFullscreen = true
[Folders]
Bios = ../../.persist/manual/games/ps2/bios
Snapshots = snaps
Savestates = sstates
MemoryCards = memcards
Logs = logs
Cheats = cheats
Patches = patches
UserResources = resources
Cache = cache
Textures = textures
InputProfiles = inputprofiles
Videos = videos
[EmuCore/GS]
VsyncEnable = true
# Internal resolution aspect corrected
ScreenshotSize = 1
# webp
ScreenshotFormat = 2
OsdShowFPS = true
# Capture video at internal resolution
VideoCaptureAutoResolution = true
# 2x native resolution
upscale_multiplier = 2
CaptureContainer = mkv
VideoCaptureCodec = av1_vaapi
AudioCaptureCodec = flac
[Filenames]
BIOS = ps2-0230a-20080220.bin
[MemoryCards]
Slot1_Enable = true
Slot1_Filename = Mcd001.ps2
Slot2_Enable = true
Slot2_Filename = Mcd002.ps2
[InputSources]
Keyboard = false
Mouse = false
SDL = true
# Enhanced ps4 and ps5 controller support
SDLControllerEnhancedMode = true
SDLPS5PlayerLED = true
[Pad1]
Type = DualShock2
InvertL = 0
InvertR = 0
Deadzone = 0
AxisScale = 1.33
LargeMotorScale = 1
SmallMotorScale = 1
ButtonDeadzone = 0
PressureModifier = 0.5
Up = SDL-0/DPadUp
Right = SDL-0/DPadRight
Down = SDL-0/DPadDown
Left = SDL-0/DPadLeft
Triangle = SDL-0/Y
Circle = SDL-0/B
Cross = SDL-0/A
Square = SDL-0/X
Select = SDL-0/Back
Start = SDL-0/Start
L1 = SDL-0/LeftShoulder
L2 = SDL-0/+LeftTrigger
R1 = SDL-0/RightShoulder
R2 = SDL-0/+RightTrigger
L3 = SDL-0/LeftStick
R3 = SDL-0/RightStick
LUp = SDL-0/-LeftY
LRight = SDL-0/+LeftX
LDown = SDL-0/+LeftY
LLeft = SDL-0/-LeftX
RUp = SDL-0/-RightY
RRight = SDL-0/+RightX
RDown = SDL-0/+RightY
RLeft = SDL-0/-RightX
Analog = SDL-0/Guide
LargeMotor = SDL-0/LargeMotor
SmallMotor = SDL-0/SmallMotor
[AutoUpdater]
CheckAtStartup = false
[GameList]
RecursivePaths = /home/deck/.persist/manual/games/ps2/roms