feat: Added new minecraft instance

This commit is contained in:
uttarayan21
2025-07-31 00:48:27 +05:30
parent 0c944a2d2f
commit c52513d5b3
8 changed files with 107 additions and 53 deletions

View File

@@ -111,6 +111,9 @@
{ {
name = "gpt-4o"; name = "gpt-4o";
} }
{
name = "o4-mini-high";
}
]; ];
} }
]; ];

View File

@@ -54,8 +54,8 @@
source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf"; source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf";
# "render:cm_fs_passthrough" = 1; # "render:cm_fs_passthrough" = 1;
monitor = [ monitor = [
"${device.monitors.primary}, 2560x1440@360, 0x0, 1, transform, 0, bitdepth, 10, cm, hdr, sdrbrightness, 1.1, sdrsaturation, 1.2" # "${device.monitors.primary}, 2560x1440@360, 0x0, 1, transform, 0, bitdepth, 10, cm, hdr, sdrbrightness, 1.1, sdrsaturation, 1.2"
# "${device.monitors.primary}, 2560x1440@360, 0x0, 1, transform, 0" "${device.monitors.primary}, 2560x1440@360, 0x0, 1, transform, 0"
"${device.monitors.secondary}, 2560x1440@170, -1440x-1120, 1, transform, 1" "${device.monitors.secondary}, 2560x1440@170, -1440x-1120, 1, transform, 1"
"${device.monitors.tertiary}, 2560x1440@170, 2560x-1120, 1, transform, 3" "${device.monitors.tertiary}, 2560x1440@170, 2560x-1120, 1, transform, 3"
]; ];

View File

@@ -17,6 +17,7 @@
./resolved.nix ./resolved.nix
./searxng.nix ./searxng.nix
./tailscale.nix ./tailscale.nix
./grafana.nix
# ./ldap.nix # ./ldap.nix
# ./llama.nix # ./llama.nix

View File

@@ -0,0 +1,42 @@
{config, ...}: {
services = {
grafana = {
enable = true;
settings = {
server = {
http_port = 3011;
};
"auth.proxy" = {
enabled = true;
header_name = "Remote-User";
};
};
};
prometheus = {
enable = true;
};
caddy = {
virtualHosts."grafana.darksailor.dev".extraConfig = ''
forward_auth localhost:5555 {
uri /api/authz/forward-auth
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
}
reverse_proxy localhost:${builtins.toString config.services.grafana.settings.server.http_port}
'';
};
authelia = {
instances.darksailor = {
settings = {
access_control = {
rules = [
{
domain = "grafana.darksailor.dev";
policy = "one_factor";
}
];
};
};
};
};
};
}

View File

@@ -18,6 +18,7 @@
"Serveus" = "79882fb6-d594-4073-a3d0-70a01d0abb67"; "Serveus" = "79882fb6-d594-4073-a3d0-70a01d0abb67";
"__Shun__" = "1c7a300f-98e4-402c-8741-432f3494bb25"; "__Shun__" = "1c7a300f-98e4-402c-8741-432f3494bb25";
"shashikant" = "20891e82-203c-4d04-9868-79a5879ecfc3"; "shashikant" = "20891e82-203c-4d04-9868-79a5879ecfc3";
"satuke" = "e4ad1799-3cfe-4cdc-b199-83ac617f1c5c";
}; };
in { in {
minecraft-servers = { minecraft-servers = {
@@ -25,7 +26,8 @@
eula = true; eula = true;
openFirewall = true; openFirewall = true;
environmentFile = config.sops.templates."craftmine.env".path; environmentFile = config.sops.templates."craftmine.env".path;
servers.fabric = { servers = {
fabric = {
inherit whitelist; inherit whitelist;
enable = true; enable = true;
# enable-rcon = true; # enable-rcon = true;
@@ -39,7 +41,7 @@
white-list = true; white-list = true;
}; };
}; };
servers.craftmine = { craftmine = {
inherit whitelist; inherit whitelist;
enable = true; enable = true;
jvmOpts = "-Xmx4G -Xms4G"; jvmOpts = "-Xmx4G -Xms4G";
@@ -57,6 +59,28 @@
enable-rcon = true; enable-rcon = true;
"rcon.password" = "@CRAFTMINE_RCON_PASSWORD@"; "rcon.password" = "@CRAFTMINE_RCON_PASSWORD@";
motd = "Servius's Craftmine Server"; motd = "Servius's Craftmine Server";
server-port = 25570;
white-list = true;
view-distance = 32;
};
};
craftmine-v2 = {
inherit whitelist;
enable = true;
jvmOpts = "-Xmx4G -Xms4G";
package = let
getJavaVersion = v: (builtins.getAttr "openjdk${toString v}" pkgs.javaPackages.compiler).headless;
in
pkgs.minecraft-server.override {
url = "https://piston-data.mojang.com/v1/objects/4527a9019e37e001770787e4523b505f79cac4c5/server.jar";
sha1 = "sha1-RSepAZ434AF3B4fkUjtQX3nKxMU=";
version = "25w14craftmine";
jre_headless = getJavaVersion 21;
};
serverProperties = {
enable-rcon = true;
"rcon.password" = "@CRAFTMINE_RCON_PASSWORD@";
motd = "Servius's Craftmine Server v2";
server-port = 25569; server-port = 25569;
white-list = true; white-list = true;
view-distance = 32; view-distance = 32;
@@ -64,4 +88,5 @@
}; };
}; };
}; };
};
} }

View File

@@ -9,7 +9,7 @@
./homeassistant.nix ./homeassistant.nix
./flaresolverr.nix ./flaresolverr.nix
./caddy.nix ./caddy.nix
./grafana.nix # ./grafana.nix
# ./dnscrypt.nix # ./dnscrypt.nix
# ./resolved.nix # ./resolved.nix
# ./blocky.nix # ./blocky.nix

View File

@@ -1,16 +0,0 @@
{config, ...}: {
services = {
grafana = {
enable = true;
};
prometheus = {
enable = true;
};
caddy = {
virtualHosts."grafana.tsuba.darksailor.dev".extraConfig = ''
import hetzner
reverse_proxy localhost:${builtins.toString config.services.grafana.port}
'';
};
};
}

View File

@@ -42,7 +42,6 @@
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
} }
''; '';
# auth = "";
in { in {
"sonarr.tsuba.darksailor.dev".extraConfig = '' "sonarr.tsuba.darksailor.dev".extraConfig = ''
import hetzner import hetzner