forgot to change the blobercraft path to blob

This commit is contained in:
Squibid 2025-11-26 14:27:22 -05:00
parent 3d71ed911d
commit 9f388d75d8
Signed by: squibid
GPG key ID: BECE5684D3C4005D
7 changed files with 0 additions and 0 deletions

34
hosts/blob/ai.nix Normal file
View file

@ -0,0 +1,34 @@
{ lib, config, ... }:
{
options.ai.enable = lib.mkEnableOption "enable ai services";
config = lib.mkIf config.ai.enable {
fileSystems."/mnt/priv" = {
device = "192.168.50.240:/mnt/tank/Private";
fsType = "nfs";
options = [ "defaults" ];
};
services.gatus.settings.endpoints = [
{
name = "open-webui";
group = "local";
url = "http://0.0.0.0:${config.services.open-webui.port}/System/Ping";
interval = "5m";
# conditions = [''[BODY] == "Jellyfin Server"'']; # TODO:
}
];
services = {
ollama = {
enable = true;
# Optional: preload models, see https://ollama.com/library
loadModels = [ "llama3.2:3b" "deepseek-r1:1.5b"];
};
open-webui = {
enable = true;
port = 2333;
openFirewall = true;
};
};
};
}

21
hosts/blob/default.nix Normal file
View file

@ -0,0 +1,21 @@
{ modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
./disko.nix
./hardware-configuration.nix # Include the results of the hardware scan.
./jellyfin.nix
./minecraft.nix
./gatus.nix
./ai.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# ai.enable = true;
jellyfin.enable = true;
minecraft.enable = true;
}

36
hosts/blob/disko.nix Normal file
View file

@ -0,0 +1,36 @@
{ lib, ... }:
{
disko.devices = {
disk.main = {
device = lib.mkDefault "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
}

45
hosts/blob/gatus.nix Normal file
View file

@ -0,0 +1,45 @@
{ unstable, ... }: let
gatus.up = [
"[STATUS] == 200"
"[RESPONSE_TIME] < 300"
];
in {
services.gatus = {
package = unstable.gatus;
enable = true;
openFirewall = true;
settings = {
web.port = 8081;
endpoints = [
{
name = "nas";
group = "external";
url = "http://192.168.50.240";
interval = "5m";
conditions = gatus.up;
}
{
name = "site";
group = "remote";
url = "https://squi.bid";
interval = "10m";
conditions = gatus.up;
}
{
name = "git site";
group = "remote";
url = "https://git.squi.bid";
interval = "10m";
conditions = gatus.up;
}
{
name = "voidpkgs";
group = "remote";
url = "https://voidpkgs.squi.bid";
interval = "10m";
conditions = [''[BODY] == pat(*x86_64-repodata.sig2*)''];
}
];
};
};
}

View file

@ -0,0 +1,25 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

78
hosts/blob/jellyfin.nix Normal file
View file

@ -0,0 +1,78 @@
{ lib, config, ... }:
{
options.jellyfin.enable = lib.mkEnableOption "enable jellfin service";
config = lib.mkIf config.jellyfin.enable {
fileSystems."/mnt/media" = {
device = "192.168.50.240:/mnt/tank/Media";
fsType = "nfs";
options = [ "defaults" ];
};
services.gatus.settings.endpoints = [
{
name = "jellyfin";
group = "local";
url = "http://localhost:8096/System/Ping";
interval = "5m";
conditions = [''[BODY] == "Jellyfin Server"''];
}
];
services.declarative-jellyfin = {
enable = true;
openFirewall = true;
serverId = "0ba4e888503b4524a90285b7ad500256"; # could be anything
system = {
serverName = config.networking.hostName;
trickplayOptions = {
enableHwAcceleration = true;
enableHwEncoding = true;
};
pluginRepositories = [
{
content.Name = "Jellyfin Stable";
content.Url = "https://repo.jellyfin.org/files/plugin/manifest.json";
tag = "RepositoryInfo"; # Needed to generate the correct XML
}
{
content.Name = "Intro Skipper";
content.Url = "https://intro-skipper.org/manifest.json";
tag = "RepositoryInfo"; # Needed to generate the correct XML
}
];
};
users.zachary = {
mutable = false;
permissions.isAdministrator = true;
hashedPasswordFile = config.sops.secrets."jellyfin/zachary".path;
};
libraries = {
Movies = {
enabled = true;
contentType = "movies";
pathInfos = ["/mnt/media/movies"];
};
Shows = {
enabled = true;
contentType = "tvshows";
pathInfos = ["/mnt/media/shows"];
};
};
encoding = {
enableHardwareEncoding = true;
hardwareAccelerationType = "vaapi";
enableDecodingColorDepth10Hevc = true; # enable if your system supports
allowHevcEncoding = true; # enable if your system supports
allowAv1Encoding = true; # enable if your system supports
hardwareDecodingCodecs = [ # enable the codecs your system supports
"h264"
"hevc"
"mpeg2video"
"vc1"
"vp9"
"av1"
];
};
};
};
}

24
hosts/blob/minecraft.nix Normal file
View file

@ -0,0 +1,24 @@
{ lib, config, pkgs, ... }:
{
options.minecraft.enable = lib.mkEnableOption "enable minecraft user";
config = lib.mkIf config.minecraft.enable {
users.users.minecraft = {
createHome = true;
home = "/home/minecraft";
useDefaultShell = true;
isNormalUser = true;
description = "minecraft server account";
group = "minecraft";
openssh.authorizedKeys.keys = [] ++ config.ssh.keys;
# make sure we have every version of java required to run minecraft
packages = with pkgs; [
jre8
jre17_minimal
jre21_minimal
];
};
users.groups.minecraft = {};
};
}