add nvidia graphics card and open port 8083

This commit is contained in:
2024-11-06 14:07:05 +01:00
parent 2c35616fef
commit 6ab7ea7ff3
3 changed files with 28 additions and 3 deletions

View File

@ -1,4 +1,12 @@
{ config, lib, pkgs, ... }:
{
wayland.windowManager.hyprland.settings = {
monitor= [
"virt-1, 1920x1080@60, 0x0, 1.0"
];
env = ["WLR_BACKENDS,headless"];
};
}

View File

@ -9,6 +9,7 @@
];
environment.systemPackages = with pkgs; [
cudatoolkit
lm_sensors
];
@ -31,5 +32,4 @@
};
services.openssh.enable = true;
}

View File

@ -3,14 +3,16 @@
{
imports = [
modules/game.nix
modules/vboxHost.nix
modules/nvidia.nix
];
networking.hostName = "server";
services.openssh.enable = true;
networking.firewall.allowedTCPPorts = [80 443 5000];
networking.firewall.allowedUDPPorts = [80 443 5000];
networking.firewall.allowedTCPPorts = [80 443 5000 8083];
networking.firewall.allowedUDPPorts = [80 443 5000 8083];
networking = {
interfaces.eth0.ipv4.addresses = [ {
@ -21,4 +23,19 @@
nameservers = ["8.8.8.8" "8.8.4.4" "1.1.1.1"];
};
virtualisation.docker.liveRestore = false;
services.fail2ban.enable = true;
services.fail2ban.bantime = "2h";
hardware.nvidia-container-toolkit.enable = true;
hardware.nvidia = {
open = false;
# prime.nvidiaBusId = "PCI:1:0:0";
# prime.amdgpuBusId = "PCI:13:0:0";
# prime.sync.enable = true;
# modesetting.enable = true;
};
}