2025-01-13 11:52:09 +08:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options.global.jovian = mkEnableOption "set up Jovian NixOS" // {
|
|
|
|
default = true;
|
|
|
|
};
|
2024-05-11 00:03:05 +08:00
|
|
|
|
2024-06-11 11:53:49 +08:00
|
|
|
config = mkIf config.global.jovian {
|
|
|
|
jovian = {
|
|
|
|
hardware.has.amd.gpu = true;
|
|
|
|
steamos.useSteamOSConfig = true;
|
2024-06-13 08:56:50 +08:00
|
|
|
steamos.enableDefaultCmdlineConfig = false;
|
2024-04-29 22:36:32 +08:00
|
|
|
|
2024-06-11 11:53:49 +08:00
|
|
|
steam = {
|
|
|
|
enable = true;
|
|
|
|
autoStart = true;
|
|
|
|
desktopSession = "plasma";
|
|
|
|
user = "app";
|
|
|
|
};
|
2024-04-29 22:36:32 +08:00
|
|
|
};
|
|
|
|
|
2024-06-11 11:53:49 +08:00
|
|
|
users.home.persistApp.directories = [
|
2025-01-13 11:52:09 +08:00
|
|
|
".steam"
|
|
|
|
".local/share/Steam"
|
|
|
|
".config/gamescope"
|
|
|
|
".config/hhd"
|
2024-06-11 11:53:49 +08:00
|
|
|
".kodi"
|
|
|
|
];
|
2024-04-29 22:36:32 +08:00
|
|
|
|
2025-01-13 11:52:09 +08:00
|
|
|
users.users.app.extraGroups = [
|
|
|
|
"networkmanager"
|
|
|
|
"gamemode"
|
|
|
|
];
|
2024-06-11 11:53:49 +08:00
|
|
|
programs.gamemode.enable = true;
|
|
|
|
programs.regreet.enable = false;
|
|
|
|
home.plasma.enable = true;
|
|
|
|
home.plasma.extraConfig = {
|
|
|
|
configFile = {
|
|
|
|
kwinrc.Xwayland.Scale = 1.75;
|
|
|
|
kscreenlockerrc.Daemon.Autolock = false;
|
|
|
|
};
|
2024-05-14 12:14:35 +08:00
|
|
|
};
|
2024-06-10 17:08:44 +08:00
|
|
|
|
2024-07-27 23:05:13 +08:00
|
|
|
home-manager.users.app = {
|
|
|
|
home.packages = with pkgs; [
|
2025-01-13 11:52:09 +08:00
|
|
|
(pkgs.kodi-wayland.passthru.withPackages (
|
|
|
|
kodiPkgs: with kodiPkgs; [
|
|
|
|
joystick # keymap steam-controller
|
|
|
|
#controller-topology-project
|
|
|
|
libretro
|
|
|
|
libretro-2048
|
|
|
|
libretro-fuse
|
|
|
|
libretro-genplus
|
|
|
|
libretro-mgba
|
|
|
|
libretro-nestopia
|
|
|
|
libretro-snes9x
|
|
|
|
jellycon
|
|
|
|
]
|
|
|
|
))
|
2024-07-27 23:05:13 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
home.pointerCursor = {
|
|
|
|
package = pkgs.steamdeck-hw-theme;
|
|
|
|
name = "steam";
|
|
|
|
};
|
|
|
|
};
|
2024-06-10 17:08:44 +08:00
|
|
|
|
2024-06-11 11:53:49 +08:00
|
|
|
services.handheld-daemon = {
|
|
|
|
enable = true;
|
|
|
|
user = "app";
|
|
|
|
};
|
2024-06-10 17:08:44 +08:00
|
|
|
|
2024-06-11 11:53:49 +08:00
|
|
|
jovian.decky-loader = {
|
|
|
|
# ~/.steam/steam/.cef-enable-remote-debugging
|
|
|
|
enable = true;
|
|
|
|
user = "app";
|
|
|
|
extraPackages = with pkgs; [
|
2025-01-13 11:52:09 +08:00
|
|
|
curl
|
|
|
|
unzip
|
|
|
|
util-linux
|
|
|
|
gnugrep
|
|
|
|
procps
|
|
|
|
pciutils
|
|
|
|
kmod
|
|
|
|
ryzenadj
|
2024-06-11 11:53:49 +08:00
|
|
|
];
|
2025-01-13 11:52:09 +08:00
|
|
|
extraPythonPackages =
|
|
|
|
pythonPackages: with pythonPackages; [
|
|
|
|
hid
|
|
|
|
pyyaml
|
|
|
|
];
|
2024-06-11 11:53:49 +08:00
|
|
|
stateDir = "/nix/persist/decky";
|
2024-06-10 17:08:44 +08:00
|
|
|
};
|
|
|
|
|
2024-06-13 08:56:50 +08:00
|
|
|
boot.kernelParams = [
|
|
|
|
"iomem=relaxed"
|
|
|
|
"amd_pstate=passive"
|
|
|
|
];
|
|
|
|
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="${pkgs.ryzenadj}/bin/ryzenadj --max-performance"
|
|
|
|
'';
|
2024-06-11 11:53:49 +08:00
|
|
|
};
|
2024-04-29 22:36:32 +08:00
|
|
|
}
|