mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 10:18:37 +02:00
feat: refactor, update settings for sunshine (#215)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{myvars, ...}:
|
||||
{ myvars, lib, ... }:
|
||||
#############################################################
|
||||
#
|
||||
# Ai - my main computer, with NixOS + I5-13600KF + RTX 4090 GPU, for gaming & daily use.
|
||||
@@ -11,7 +11,8 @@ let
|
||||
inherit (myvars.networking.hostsAddr.${hostName}) iface ipv4 ipv6;
|
||||
ipv4WithMask = "${ipv4}/24";
|
||||
ipv6WithMask = "${ipv6}/64";
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./netdev-mount.nix
|
||||
# Include the results of the hardware scan.
|
||||
@@ -23,6 +24,8 @@ in {
|
||||
./secureboot.nix
|
||||
];
|
||||
|
||||
services.sunshine.enable = lib.mkForce true;
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
|
||||
@@ -35,7 +38,7 @@ in {
|
||||
systemd.network.enable = true;
|
||||
|
||||
systemd.network.networks."10-${iface}" = {
|
||||
matchConfig.Name = [iface];
|
||||
matchConfig.Name = [ iface ];
|
||||
networkConfig = {
|
||||
Address = [
|
||||
ipv4WithMask
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
# ===============================================================================================
|
||||
# for Nvidia GPU
|
||||
@@ -38,4 +38,11 @@
|
||||
# };
|
||||
})
|
||||
];
|
||||
|
||||
services.sunshine.settings = {
|
||||
max_bitrate = 20000; # in Kbps
|
||||
# NVIDIA NVENC Encoder
|
||||
nvenc_preset = 3; # 1(fastest + worst quality) - 7(slowest + best quality)
|
||||
nvenc_twopass = "full_res"; # quarter_res / full_res.
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user