mirror of
https://github.com/danbulant/dotfiles
synced 2026-05-19 04:18:55 +00:00
more of a setup
This commit is contained in:
parent
4a78bd831d
commit
d414ea45dd
3 changed files with 120 additions and 8 deletions
|
|
@ -16,6 +16,7 @@ let
|
|||
sonarr = 8989;
|
||||
radarr = 7878;
|
||||
jackett = 9117;
|
||||
prowlarr = 9696;
|
||||
keep = 8100;
|
||||
grafana = 3002;
|
||||
# ntfy = 3003;
|
||||
|
|
@ -25,6 +26,7 @@ let
|
|||
prometheus-qb = 9200;
|
||||
prometheus-sonarr = 9101;
|
||||
prometheus-radarr = 9102;
|
||||
prometheus-prowlarr = 9103;
|
||||
prometheus = 9090;
|
||||
};
|
||||
in
|
||||
|
|
@ -88,12 +90,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 +139,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;
|
||||
|
|
@ -266,6 +272,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 +286,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 +301,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" ];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -383,7 +383,16 @@ 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.readFile ./uc.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