feat(nixosModules/desktop): enable sunshine
This commit is contained in:
parent
1a45001401
commit
70814354aa
3 changed files with 21 additions and 6 deletions
|
@ -24,6 +24,7 @@
|
|||
enableSpotifyd = lib.mkEnableOption "";
|
||||
enableSteam = lib.mkEnableOption "";
|
||||
enableVR = lib.mkEnableOption "";
|
||||
enableSunshine = lib.mkEnableOption "";
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
|
@ -40,5 +41,16 @@
|
|||
};
|
||||
environment.systemPackages = [ pkgs.android-tools ];
|
||||
})
|
||||
(lib.mkIf config.desktop.enableSunshine {
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
capSysAdmin = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
sunshine_name = config.system.hostname;
|
||||
};
|
||||
applications = { };
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -6,13 +6,15 @@
|
|||
}:
|
||||
{
|
||||
config = lib.mkIf (config.hardware.gpu == "nvidia") {
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
graphics.extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
nvidia.open = true;
|
||||
nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
};
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.open = true;
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
environment.variables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue