nixos/spec/koumakyou/jovian.nix

91 lines
2.2 KiB
Nix

{ pkgs, lib, config, jovian, ... }: {
imports = [
jovian.nixosModules.jovian
];
jovian = {
hardware.has.amd.gpu = true;
steamos.useSteamOSConfig = true;
steamos.enableDefaultCmdlineConfig = false;
steam = {
enable = true;
autoStart = true;
desktopSession = "plasma";
user = "app";
};
};
users.home.persistApp.directories = [
".steam" ".local/share/Steam"
".config/gamescope" ".config/hhd"
".kodi"
];
users.users.app.extraGroups = [ "networkmanager" "gamemode" ];
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;
};
};
home-manager.users.app.home.packages = with pkgs; [
(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
]))
];
services.handheld-daemon = {
enable = true;
user = "app";
};
jovian.decky-loader = let
adjustor = pkgs.python3.pkgs.buildPythonApplication rec {
pname = "adjustor";
version = "2.1.5";
pyproject = true;
src = pkgs.fetchFromGitHub {
owner = "hhd-dev";
repo = pname;
rev = "v${version}";
hash = "sha256-KgeK2lC3b9VbjYmy7rD/ImODWDDx3pWIzWgNnSLJeDs=";
};
propagatedBuildInputs = with pkgs.python3.pkgs; [
setuptools
pyroute2
rich
];
# This package doesn't have upstream tests.
doCheck = false;
};
in {
# ~/.steam/steam/.cef-enable-remote-debugging
enable = true;
user = "app";
extraPackages = with pkgs; [
curl unzip util-linux gnugrep procps pciutils kmod
ryzenadj # adjustor
];
extraPythonPackages = pythonPackages: with pythonPackages; [
hid pyyaml
# adjustor
];
stateDir = "/nix/persist/decky";
};
boot.kernelParams = lib.mkIf config.jovian.decky-loader.enable [ "iomem=relaxed" "amd_pstate=passive" ];
}