fix(koumakyou): add gamemode and enable decky

This commit is contained in:
514fpv 2024-06-10 17:08:44 +08:00
parent a4bf22a6ee
commit a9235ece23
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
2 changed files with 50 additions and 10 deletions

View file

@ -43,6 +43,7 @@
programs.regreet.enable = lib.mkForce true; programs.regreet.enable = lib.mkForce true;
jovian.steam.autoStart = lib.mkForce false; jovian.steam.autoStart = lib.mkForce false;
jovian.steam.desktopSession = lib.mkForce "sway"; jovian.steam.desktopSession = lib.mkForce "sway";
jovian.decky-loader.enable = lib.mkForce false;
home.plasma.enable = lib.mkForce false; home.plasma.enable = lib.mkForce false;
services.greetd.settings.default_session.command = let services.greetd.settings.default_session.command = let
cfg = config.programs.regreet; cfg = config.programs.regreet;

View file

@ -1,4 +1,4 @@
{ pkgs, jovian, ... }: { { pkgs, lib, config, jovian, ... }: {
imports = [ imports = [
jovian.nixosModules.jovian jovian.nixosModules.jovian
]; ];
@ -17,11 +17,13 @@
}; };
users.home.persistApp.directories = [ users.home.persistApp.directories = [
".steam" ".local/share/Steam" ".config/gamescope" ".steam" ".local/share/Steam"
".config/gamescope" ".config/hhd"
".kodi" ".kodi"
]; ];
users.users.app.extraGroups = [ "networkmanager" ]; users.users.app.extraGroups = [ "networkmanager" "gamemode" ];
programs.gamemode.enable = true;
programs.regreet.enable = false; programs.regreet.enable = false;
home.plasma.enable = true; home.plasma.enable = true;
home.plasma.extraConfig = { home.plasma.extraConfig = {
@ -41,11 +43,48 @@
jellycon jellycon
])) ]))
]; ];
} // {
#users.users.decky.uid = 514; services.handheld-daemon = {
#users.groups.decky.gid = 514; enable = true;
#jovian.decky-loader = { user = "app";
# enable = true; };
# stateDir = "/nix/persist/decky";
#}; 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" ];
} }