refactor services

This commit is contained in:
ari committed 2024-11-09 11:12:19 -05:00
1 parent a27d701bac
commit 52ae9d193b
8 files changed
+47 -27

No files matched your search

+3 -24
View File
@@ -13,30 +13,9 @@
# Special udev rule for google's coral tpu
skyg.nixos.server.udevrules.coraltpu.enable = true;
# Containers
virtualisation.oci-containers = {
containers = {
scrypted = {
autoStart = true;
image = "ghcr.io/koush/scrypted";
extraOptions = [ "--network=host" ];
volumes = [
"/var/run/dbus:/var/run/dbus"
"/var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket"
"/opt/homelab/scrypted/db:/server/volume"
"/mnt/EightTerra/NVR:/nvr"
];
environment = {
SCRYPTED_NVR_VOLUME = "/nvr";
};
};
};
};
# K8s
services.kubernetes.kubelet.hostname = "minipc2.lab.internal";
skyg.nixos.server.k8s = {
enable = true;
isNode = true;
# Services
skyg.nixos.server.services = {
scrypted.enable = true;
};
}
+2
View File
@@ -11,6 +11,8 @@ let
20048
# ssh
22
# prometheus
9090
];
in
{
-3
View File
@@ -1,11 +1,8 @@
{ ... }:
{
imports = [
./audiobookshelf.nix
./coral-tpu-udev.nix
./exporters.nix
./ai-services.nix
./jellyfin.nix
./admin.nix
./arrs
./k8s
@@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./audiobookshelf.nix
./ai-services.nix
./jellyfin.nix
];
}
File renamed without changes.
@@ -0,0 +1,34 @@
{ config, lib, ... }:
let
cfg = config.skyg.nixos.server.services.scrypted;
in
{
options = {
skyg.nixos.server.services.scrypted = {
enable = lib.mkEnableOption
"Enable Scrypted";
};
};
config = lib.mkIf cfg.enable {
virtualisation.oci-containers = {
containers = {
scrypted = {
autoStart = true;
image = "ghcr.io/koush/scrypted";
extraOptions = [ "--network=host" ];
volumes = [
"/var/run/dbus:/var/run/dbus"
"/var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket"
"/opt/homelab/scrypted/db:/server/volume"
"/mnt/EightTerra/NVR:/nvr"
];
environment = {
SCRYPTED_NVR_VOLUME = "/nvr";
};
};
};
};
};
}