refactor(koumakyou): clean up jovian config
This commit is contained in:
parent
4d77320203
commit
ab7e7606f0
2 changed files with 63 additions and 87 deletions
|
@ -1,90 +1,66 @@
|
|||
{ pkgs, lib, config, jovian, ... }: {
|
||||
imports = [
|
||||
jovian.nixosModules.jovian
|
||||
];
|
||||
{ pkgs, lib, config, ... }: with lib; {
|
||||
options.global.jovian = mkEnableOption "set up Jovian NixOS" // { default = true; };
|
||||
|
||||
jovian = {
|
||||
hardware.has.amd.gpu = true;
|
||||
steamos.useSteamOSConfig = true;
|
||||
steamos.enableDefaultCmdlineConfig = false;
|
||||
config = mkIf config.global.jovian {
|
||||
jovian = {
|
||||
hardware.has.amd.gpu = true;
|
||||
steamos.useSteamOSConfig = true;
|
||||
#steamos.enableDefaultCmdlineConfig = false;
|
||||
|
||||
steam = {
|
||||
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;
|
||||
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
|
||||
jovian.decky-loader = {
|
||||
# ~/.steam/steam/.cef-enable-remote-debugging
|
||||
enable = true;
|
||||
user = "app";
|
||||
extraPackages = with pkgs; [
|
||||
curl unzip util-linux gnugrep procps pciutils kmod ryzenadj
|
||||
];
|
||||
|
||||
# This package doesn't have upstream tests.
|
||||
doCheck = false;
|
||||
extraPythonPackages = pythonPackages: with pythonPackages; [
|
||||
hid pyyaml
|
||||
];
|
||||
stateDir = "/nix/persist/decky";
|
||||
};
|
||||
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" ];
|
||||
boot.kernelParams = [ "iomem=relaxed" "amd_pstate=passive" ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue