add sunshine
This commit is contained in:
@@ -219,7 +219,8 @@
|
|||||||
novnc.enable = true;
|
novnc.enable = true;
|
||||||
minecraft.enable = false; #wont connect
|
minecraft.enable = false; #wont connect
|
||||||
|
|
||||||
sandbox.enable = true;
|
sandbox.enable = false;
|
||||||
|
sunshine.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
|
|
||||||
config = lib.mkIf config.sysconfig.opts.virtualization.sandbox.enable {
|
config = lib.mkIf config.sysconfig.opts.virtualization.sandbox.enable {
|
||||||
|
|
||||||
containers.sandbox-test = {
|
containers.sandbox = {
|
||||||
|
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
hostAddress = "192.168.100.10";
|
hostAddress = "192.168.100.10";
|
||||||
localAddress = "192.168.100.31";
|
localAddress = "192.168.100.32";
|
||||||
|
|
||||||
ephemeral = true;
|
ephemeral = true;
|
||||||
|
|
||||||
|
|||||||
97
system-config/services/containers/sunshine/default.nix
Normal file
97
system-config/services/containers/sunshine/default.nix
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
options.sysconfig.opts.virtualization.sunshine.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.sysconfig.opts.virtualization.sunshine.enable {
|
||||||
|
|
||||||
|
containers.sunshine = {
|
||||||
|
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "192.168.100.10";
|
||||||
|
localAddress = "192.168.100.31";
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
services.sunshine = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
bindMounts = {
|
||||||
|
"/dev/nvidia0" = {
|
||||||
|
hostPath = "/dev/nvidia0";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
"/dev/nvidiactl" = {
|
||||||
|
hostPath = "/dev/nvidiactl";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
"/dev/nvidia-uvm" = {
|
||||||
|
hostPath = "/dev/nvidia-uvm";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
"/dev/nvidia-modeset" = {
|
||||||
|
hostPath = "/dev/nvidia-modeset";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
"/dev/nvidia-uvm-tools" = {
|
||||||
|
hostPath = "/dev/nvidia-uvm-tools";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
"/dev/dri" = {
|
||||||
|
hostPath = "/dev/dri";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
allowedDevices = [
|
||||||
|
{
|
||||||
|
node = "/dev/nvidia0";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/nvidiactl";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/nvidia-uvm";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/nvidia-modeset";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/nvidia-uvm-tools";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/dri/card0";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/dri/card1";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/dri/renderD128";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/dri/renderD129";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
system-config/services/sunshine/default.nix
Normal file
18
system-config/services/sunshine/default.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
options.sysconfig.opts.sunshine.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.sysconfig.opts.sunshine.enable {
|
||||||
|
|
||||||
|
services.sunshine = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user