mirror of
https://github.com/danbulant/dotfiles
synced 2026-05-24 12:35:34 +00:00
Compare commits
4 commits
4a78bd831d
...
c51430f9c1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c51430f9c1 | ||
|
|
c506215847 | ||
|
|
51f7519c3b | ||
|
|
d414ea45dd |
5 changed files with 185 additions and 17 deletions
|
|
@ -16,8 +16,10 @@ let
|
|||
sonarr = 8989;
|
||||
radarr = 7878;
|
||||
jackett = 9117;
|
||||
prowlarr = 9696;
|
||||
keep = 8100;
|
||||
grafana = 3002;
|
||||
tolgee = 8200;
|
||||
# ntfy = 3003;
|
||||
};
|
||||
internalPorts = {
|
||||
|
|
@ -25,6 +27,7 @@ let
|
|||
prometheus-qb = 9200;
|
||||
prometheus-sonarr = 9101;
|
||||
prometheus-radarr = 9102;
|
||||
prometheus-prowlarr = 9103;
|
||||
prometheus = 9090;
|
||||
};
|
||||
in
|
||||
|
|
@ -88,12 +91,10 @@ in
|
|||
enable = true;
|
||||
settings.server.port = ports.radarr;
|
||||
};
|
||||
|
||||
jackett = {
|
||||
prowlarr = {
|
||||
enable = true;
|
||||
port = ports.jackett;
|
||||
settings.server.port = ports.prowlarr;
|
||||
};
|
||||
|
||||
karakeep = {
|
||||
enable = true;
|
||||
extraEnvironment = {
|
||||
|
|
@ -139,6 +140,12 @@ in
|
|||
port = internalPorts.prometheus-sonarr;
|
||||
apiKeyFile = "/etc/secrets/sonarr_api_key";
|
||||
};
|
||||
exportarr-prowlarr = {
|
||||
enable = true;
|
||||
url = "http://127.0.0.1:${toString ports.prowlarr}";
|
||||
port = internalPorts.prometheus-prowlarr;
|
||||
apiKeyFile = "/etc/secrets/prowlarr_api_key";
|
||||
};
|
||||
node = {
|
||||
enable = true;
|
||||
port = internalPorts.prometheus-node;
|
||||
|
|
@ -227,17 +234,25 @@ in
|
|||
}
|
||||
'';
|
||||
|
||||
virtualHosts = builtins.listToAttrs (
|
||||
map (k: {
|
||||
name = "${k}.eisen.danbulant.cloud:80, ${k}.eisen:80";
|
||||
value = {
|
||||
# import auth
|
||||
virtualHosts =
|
||||
builtins.listToAttrs (
|
||||
map (k: {
|
||||
name = "${k}.eisen.danbulant.cloud:80, ${k}.eisen:80";
|
||||
value = {
|
||||
# import auth
|
||||
extraConfig = ''
|
||||
reverse_proxy http://localhost:${toString ports.${k}}
|
||||
'';
|
||||
};
|
||||
}) (builtins.attrNames ports)
|
||||
)
|
||||
// {
|
||||
"translations.danbulant.cloud:80, translations.rpi1.danbulant.cloud:80" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy http://localhost:${toString ports.${k}}
|
||||
reverse_proxy http://localhost:${toString ports.tolgee}
|
||||
'';
|
||||
};
|
||||
}) (builtins.attrNames ports)
|
||||
);
|
||||
};
|
||||
};
|
||||
tailscale.permitCertUid = "caddy";
|
||||
tailscaleAuth = {
|
||||
|
|
@ -266,6 +281,7 @@ in
|
|||
environmentFiles = [ "/etc/secrets/gluetun.env" ];
|
||||
ports = [
|
||||
"${toString ports.qb}:${toString ports.qb}"
|
||||
"${toString ports.jackett}:${toString ports.jackett}"
|
||||
];
|
||||
# VPN_SERVICE_PROVIDER=protonvpn
|
||||
# VPN_TYPE=wireguard
|
||||
|
|
@ -279,10 +295,10 @@ in
|
|||
FIREWALL_INPUT_PORTS = "41641,22,80,443,53";
|
||||
|
||||
VPN_PORT_FORWARDING_UP_COMMAND = ''
|
||||
/bin/sh -c 'wget -O- -nv --retry-connrefused --post-data "json={\"listen_port\":{{PORT}},\"current_network_interface\":\"{{VPN_INTERFACE}}\",\"random_port\":false,\"upnp\":false}" http://172.17.0.1:${toString ports.qb}/api/v2/app/setPreferences'
|
||||
/bin/sh -c 'wget -O- -nv --retry-connrefused --post-data "json={\"listen_port\":{{PORT}},\"current_network_interface\":\"{{VPN_INTERFACE}}\",\"random_port\":false,\"upnp\":false}" http://127.0.0.1:${toString ports.qb}/api/v2/app/setPreferences'
|
||||
'';
|
||||
VPN_PORT_FORWARDING_DOWN_COMMAND = ''
|
||||
/bin/sh -c 'wget -O- -nv --retry-connrefused --post-data "json={\"listen_port\":0,\"current_network_interface\":\"lo\"}" http://172.17.0.1:${toString ports.qb}/api/v2/app/setPreferences'
|
||||
/bin/sh -c 'wget -O- -nv --retry-connrefused --post-data "json={\"listen_port\":0,\"current_network_interface\":\"lo\"}" http://127.0.0.1:${toString ports.qb}/api/v2/app/setPreferences'
|
||||
'';
|
||||
};
|
||||
# extraOptions = [ "--network=host" ];
|
||||
|
|
@ -294,7 +310,19 @@ in
|
|||
WEBUI_PORT = toString ports.qb;
|
||||
};
|
||||
|
||||
volumes = [ "/media/large/downloads:/large" ];
|
||||
volumes = [
|
||||
"/media/large/downloads:/downloads"
|
||||
"qbittorrent-config:/config"
|
||||
];
|
||||
|
||||
extraOptions = [ "--network=container:gluetun" ];
|
||||
};
|
||||
jackett = {
|
||||
image = "lscr.io/linuxserver/jackett";
|
||||
|
||||
volumes = [
|
||||
"jackett-config:/config"
|
||||
];
|
||||
|
||||
extraOptions = [ "--network=container:gluetun" ];
|
||||
};
|
||||
|
|
@ -308,6 +336,19 @@ in
|
|||
extraOptions = [ "--network=host" ];
|
||||
# ports = [ "8000:${toString internalPorts.prometheus-qb}" ];
|
||||
};
|
||||
|
||||
tolgee = {
|
||||
image = "tolgee/tolgee";
|
||||
volumes = [
|
||||
"data:/data"
|
||||
];
|
||||
ports = [
|
||||
"${toString ports.tolgee}:8080"
|
||||
];
|
||||
environment = {
|
||||
TOLGEE_AUTHENTICATION_ENABLED = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -122,6 +122,11 @@
|
|||
url = "http://sonarr.eisen.danbulant.cloud";
|
||||
icon = "si:sonarr";
|
||||
}
|
||||
{
|
||||
title = "Prowlarr";
|
||||
url = "http://prowlarr.eisen.danbulant.cloud";
|
||||
icon = "si:prowlarr";
|
||||
}
|
||||
{
|
||||
title = "Vaultwarden";
|
||||
url = "https://vaultwarden.danbulant.cloud";
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
# vr
|
||||
services.monado = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
defaultRuntime = true; # Register as default OpenXR runtime
|
||||
};
|
||||
systemd.user.services.monado.environment = {
|
||||
|
|
@ -70,6 +70,31 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
nvitop
|
||||
basalt-monado
|
||||
cudaPackages.cuda_nvcc
|
||||
(llama-cpp.overrideAttrs (prevAttrs: {
|
||||
cmakeFlags = with lib; [
|
||||
# -march=native is non-deterministic; override with platform-specific flags if needed
|
||||
(cmakeBool "GGML_NATIVE" true)
|
||||
(cmakeBool "LLAMA_BUILD_EXAMPLES" false)
|
||||
(cmakeBool "LLAMA_BUILD_SERVER" true)
|
||||
(cmakeBool "LLAMA_BUILD_TESTS" false)
|
||||
(cmakeBool "LLAMA_OPENSSL" true)
|
||||
(cmakeBool "BUILD_SHARED_LIBS" true)
|
||||
(cmakeBool "GGML_BLAS" false)
|
||||
(cmakeBool "GGML_LTO" true)
|
||||
(cmakeBool "GGML_CLBLAST" true)
|
||||
(cmakeBool "GGML_CUDA" true)
|
||||
(cmakeBool "GGML_CUDA_GRAPHS" true)
|
||||
(cmakeBool "GGML_CUDA_F16" true)
|
||||
(cmakeBool "GGML_CUDA_FA_ALL_QUANTS" true)
|
||||
(cmakeBool "GGML_HIP" false)
|
||||
(cmakeBool "GGML_METAL" false)
|
||||
(cmakeBool "GGML_RPC" false)
|
||||
(cmakeBool "GGML_VULKAN" false)
|
||||
(cmakeFeature "LLAMA_BUILD_NUMBER" "8770")
|
||||
(cmakeFeature "CMAKE_CUDA_ARCHITECTURES" "120")
|
||||
];
|
||||
}))
|
||||
];
|
||||
hardware.nvidia = {
|
||||
open = true;
|
||||
|
|
|
|||
|
|
@ -383,7 +383,20 @@ in
|
|||
"-c"
|
||||
"cd /home/dan/projects/dotfiles; nh os switch ."
|
||||
];
|
||||
zen-browser.enable = true;
|
||||
zen-browser = {
|
||||
enable = true;
|
||||
extraPrefsFiles = [
|
||||
# (builtins.fetchurl {
|
||||
# url = "https://raw.githubusercontent.com/MrOtherGuy/fx-autoconfig/master/program/config.js";
|
||||
# sha256 = "1mx679fbc4d9x4bnqajqx5a95y1lfasvf90pbqkh9sm3ch945p40";
|
||||
# })
|
||||
# (builtins.toFile (builtins.readFile ./uc.js))
|
||||
(builtins.path {
|
||||
path = ./uc.js;
|
||||
name = "config.js";
|
||||
})
|
||||
];
|
||||
};
|
||||
fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
|
|
|
|||
84
servers/ui-mode/uc.js
Normal file
84
servers/ui-mode/uc.js
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
// ==UserScript==
|
||||
// @name Theme Hot Reload
|
||||
// @namespace userChrome.js
|
||||
// @description A UI reloader watching userChrome.css.
|
||||
// @version 2.1
|
||||
// @include *
|
||||
// @onlyonce
|
||||
// ==/UserScript==
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
console.warn("[ThemeReloader] SCRIPT EVALUATED");
|
||||
|
||||
const Reloader = {
|
||||
lastModified: 0,
|
||||
file: null,
|
||||
timer: null,
|
||||
|
||||
init() {
|
||||
try {
|
||||
console.warn("[ThemeReloader] Initializing...");
|
||||
|
||||
this.file = Services.dirsvc.get("UChrm", Ci.nsIFile);
|
||||
this.file.append("userChrome.css");
|
||||
|
||||
if (!this.file.exists() || !this.file.isFile()) {
|
||||
console.warn(
|
||||
`[ThemeReloader] userChrome.css NOT FOUND at: ${this.file.path}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.lastModified = this.file.lastModifiedTime;
|
||||
console.warn(`[ThemeReloader] Watching: ${this.file.path}`);
|
||||
|
||||
this.start();
|
||||
} catch (e) {
|
||||
console.error(`[ThemeReloader] Init Error: ${e}`);
|
||||
}
|
||||
},
|
||||
|
||||
start() {
|
||||
if (this.timer) clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
try {
|
||||
const fresh = this.file.clone();
|
||||
if (fresh.exists() && fresh.lastModifiedTime > this.lastModified) {
|
||||
console.warn("[ThemeReloader] Change detected. Reloading theme...");
|
||||
this.lastModified = fresh.lastModifiedTime;
|
||||
this.reload();
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(`[ThemeReloader] Watch Error: ${e}`);
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
reload() {
|
||||
try {
|
||||
const sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(
|
||||
Ci.nsIStyleSheetService,
|
||||
);
|
||||
const uri = Services.io.newFileURI(this.file);
|
||||
|
||||
[sss.USER_SHEET, sss.AGENT_SHEET].forEach((type) => {
|
||||
if (sss.sheetRegistered(uri, type)) {
|
||||
sss.unregisterSheet(uri, type);
|
||||
}
|
||||
sss.loadAndRegisterSheet(uri, type);
|
||||
});
|
||||
|
||||
Services.obs.notifyObservers(null, "chrome-flush-caches", null);
|
||||
console.warn("[ThemeReloader] Reload complete.");
|
||||
} catch (e) {
|
||||
console.error(`[ThemeReloader] Reload Error: ${e}`);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
setTimeout(() => {
|
||||
Reloader.init();
|
||||
}, 1000);
|
||||
})();
|
||||
Loading…
Reference in a new issue