Add nix arr-box config because why do this with docker in the first place
Some checks are pending
/ Build Nix targets (push) Waiting to run
Some checks are pending
/ Build Nix targets (push) Waiting to run
This commit is contained in:
parent
e0622a450e
commit
cdbdfb278d
4 changed files with 132 additions and 0 deletions
57
services/jellyfin-nvidia/default.nix
Normal file
57
services/jellyfin-nvidia/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.services.vm_jellyfin_nvidia;
|
||||
in {
|
||||
options.services.vm_jellyfin_nvidia = {
|
||||
enable = lib.mkEnableOption "Enable minimal config";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
nvtopPackages.nvidia
|
||||
];
|
||||
};
|
||||
# Nvidia Hardware Acceleration config
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [ cudaPackages.cudatoolkit ];
|
||||
};
|
||||
nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
nvidiaSettings = true;
|
||||
modesetting.enable = true;
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module
|
||||
# Recommended by Nvidia for 20+ series GPU
|
||||
open = true;
|
||||
};
|
||||
};
|
||||
services = {
|
||||
jellyfin = {
|
||||
enable = true;
|
||||
user = "tbarnouin";
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
fileSystems."/mnt/media" = {
|
||||
device = "192.168.1.125:/BIGDATA";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
60
services/nixarr/default.nix
Normal file
60
services/nixarr/default.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.services.vm_nixarr;
|
||||
in {
|
||||
options.services.vm_nixarr = {
|
||||
enable = lib.mkEnableOption "Enable minimal config";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
age.secrets = {
|
||||
nixarr-lapi-key = {
|
||||
file = ../../secrets/nixarr-lapi-key.age;
|
||||
owner = "crowdsec";
|
||||
};
|
||||
};
|
||||
services = {
|
||||
crowdsec = {
|
||||
hub.collections = [
|
||||
"LePresidente/gitea"
|
||||
];
|
||||
settings.lapi.credentialsFile = "${config.age.secrets.nixarr-lapi-key.path}";
|
||||
localConfig = {
|
||||
acquisitions = [
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = [ "_SYSTEMD_UNIT=radarr.service" ];
|
||||
labels = {
|
||||
type = "syslog";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
prowlarr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
bazarr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
sonarr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
radarr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
jellyseer = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [3000];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue