mirror of
https://github.com/danbulant/dotfiles
synced 2026-05-24 12:35:34 +00:00
wip qb setup
This commit is contained in:
parent
f12e603497
commit
3fa6ddfb04
4 changed files with 237 additions and 172 deletions
|
|
@ -1,13 +1,13 @@
|
||||||
font_family Fira Code Retina
|
font_family Fira Code Retina
|
||||||
font_features FiraCode-Retina +zero
|
font_features FiraCode-Retina +zero
|
||||||
background_opacity 0.4
|
background_opacity 0.6
|
||||||
shell nu
|
shell nu
|
||||||
#map ctrl+shift+c copy_to_clipboard
|
#map ctrl+shift+c copy_to_clipboard
|
||||||
#map ctrl+shift+v paste_from_clipboard
|
#map ctrl+shift+v paste_from_clipboard
|
||||||
|
|
||||||
include dank-tabs.conf
|
include dank-tabs.conf
|
||||||
|
|
||||||
tab_bar_edge top
|
tab_bar_edge bottom
|
||||||
tab_bar_style powerline
|
tab_bar_style powerline
|
||||||
tab_powerline_style round
|
tab_powerline_style round
|
||||||
tab_activity_symbol *
|
tab_activity_symbol *
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,43 @@
|
||||||
{
|
{
|
||||||
# config,
|
|
||||||
nix-index-database,
|
nix-index-database,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
name ? "eisen",
|
name ? "eisen",
|
||||||
# copyparty,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# these are used both in service configuration but also to
|
# these are used both in service configuration but also to
|
||||||
# create mappings {name}.eisen.danbulant.cloud to port in caddy
|
# create mappings {name}.eisen.danbulant.cloud to port in caddy
|
||||||
ports = {
|
ports = {
|
||||||
"status" = 3001;
|
status = 3001;
|
||||||
"glance" = 5678;
|
glance = 5678;
|
||||||
"jellyfin" = 8096;
|
jellyfin = 8096;
|
||||||
# "copyparty" = 3210;
|
qb = 8081;
|
||||||
# "syncthing" = 8384;
|
sonarr = 8989;
|
||||||
# "gitea" = 3000;
|
radarr = 7878;
|
||||||
# "immich" = 2283;
|
jackett = 9117;
|
||||||
# "grafana" = 3002;
|
keep = 8100;
|
||||||
"ntfy" = 3003;
|
grafana = 3002;
|
||||||
# "suwayomi" = 3004;
|
# ntfy = 3003;
|
||||||
|
};
|
||||||
|
internalPorts = {
|
||||||
|
prometheus-node = 9000;
|
||||||
|
prometheus-qb = 9200;
|
||||||
|
prometheus-sonarr = 9101;
|
||||||
|
prometheus-radarr = 9102;
|
||||||
|
prometheus = 9090;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
deployment = {
|
deployment = {
|
||||||
buildOnTarget = true;
|
buildOnTarget = true;
|
||||||
|
targetHost = "192.168.1.114";
|
||||||
};
|
};
|
||||||
|
|
||||||
# nixpkgs.overlays = [ copyparty.overlays.default ];
|
|
||||||
|
|
||||||
programs.nix-index-database.comma.enable = true;
|
programs.nix-index-database.comma.enable = true;
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
nix-index-database.nixosModules.nix-index
|
nix-index-database.nixosModules.nix-index
|
||||||
# copyparty.nixosModules.default
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -76,45 +79,30 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# syncthing = {
|
sonarr = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# openDefaultPorts = true;
|
settings.server.port = ports.sonarr;
|
||||||
# settings = {
|
};
|
||||||
# gui = {
|
|
||||||
# insecureSkipHostCheck = true;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
# copyparty = {
|
radarr = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
|
settings.server.port = ports.radarr;
|
||||||
|
};
|
||||||
|
|
||||||
# settings = {
|
jackett = {
|
||||||
# p = ports.copyparty;
|
enable = true;
|
||||||
# idp-hm-usr = "^X-Webauth-Login^danbulant@github^dan";
|
port = ports.jackett;
|
||||||
# rproxy = 1;
|
};
|
||||||
# xff-hdr = "X-Forwarded-For";
|
|
||||||
# ipu = [ "100.103.148.81/32=dan" /*"100.79.186.114/32=dan" "100.76.144.133/32=dan" "100.114.62.113/32=dan" */ ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# accounts = {
|
karakeep = {
|
||||||
# dan = {
|
enable = true;
|
||||||
# passwordFile = "/dev/null";
|
extraEnvironment = {
|
||||||
# };
|
PORT = toString ports.keep;
|
||||||
# };
|
# DISABLE_SIGNUPS = "true";
|
||||||
|
DISABLE_NEW_RELEASE_CHECK = "true";
|
||||||
# volumes = {
|
};
|
||||||
# "/" = {
|
environmentFile = "/etc/secrets/karakeep.env";
|
||||||
# path = "/media/large";
|
};
|
||||||
# access = {
|
|
||||||
# rwa = [ "dan" ];
|
|
||||||
# r = [ "*" ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
# openFilesLimit = 8192;
|
|
||||||
# };
|
|
||||||
|
|
||||||
dnsmasq = {
|
dnsmasq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -127,35 +115,79 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# grafana = {
|
grafana = {
|
||||||
# enable = true;
|
|
||||||
# settings.server.http_port = ports.grafana;
|
|
||||||
# };
|
|
||||||
# prometheus.enable = true;
|
|
||||||
|
|
||||||
# suwayomi-server = {
|
|
||||||
# enable = true;
|
|
||||||
# settings.server = {
|
|
||||||
# port = ports.suwayomi;
|
|
||||||
# extensionRepos = [
|
|
||||||
# "https://raw.githubusercontent.com/keiyoushi/extensions/repo/index.min.json"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
# flaresolverr.enable = true;
|
|
||||||
|
|
||||||
# immich = {
|
|
||||||
# enable = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
ntfy-sh = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
listen-http = ":${toString ports.ntfy}";
|
server.http_port = ports.grafana;
|
||||||
base-url = "http://ntfy.eisen";
|
security = {
|
||||||
|
secret_key = "$__file{/etc/secrets/gf_secret_key}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
prometheus = {
|
||||||
|
enable = true;
|
||||||
|
exporters = {
|
||||||
|
exportarr-radarr = {
|
||||||
|
enable = true;
|
||||||
|
url = "http://127.0.0.1:${toString ports.radarr}";
|
||||||
|
port = internalPorts.prometheus-radarr;
|
||||||
|
apiKeyFile = "/etc/secrets/radarr_api_key";
|
||||||
|
};
|
||||||
|
exportarr-sonarr = {
|
||||||
|
enable = true;
|
||||||
|
url = "http://127.0.0.1:${toString ports.sonarr}";
|
||||||
|
port = internalPorts.prometheus-sonarr;
|
||||||
|
apiKeyFile = "/etc/secrets/sonarr_api_key";
|
||||||
|
};
|
||||||
|
node = {
|
||||||
|
enable = true;
|
||||||
|
port = internalPorts.prometheus-node;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
scrapeConfigs = [
|
||||||
|
{
|
||||||
|
job_name = "node";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [ "localhost:${toString internalPorts.prometheus-node}" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
job_name = "qb";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [ "localhost:${toString internalPorts.prometheus-qb}" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
job_name = "sonarr";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [ "localhost:${toString internalPorts.prometheus-sonarr}" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
job_name = "radarr";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [ "localhost:${toString internalPorts.prometheus-radarr}" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# ntfy-sh = {
|
||||||
|
# enable = true;
|
||||||
|
# settings = {
|
||||||
|
# listen-http = ":${toString ports.ntfy}";
|
||||||
|
# base-url = "http://ntfy.eisen";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
# grafana-to-ntfy = {
|
# grafana-to-ntfy = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
|
|
@ -216,10 +248,69 @@ in
|
||||||
};
|
};
|
||||||
# systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
|
# systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
|
||||||
|
|
||||||
virtualisation.docker = {
|
virtualisation = {
|
||||||
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableOnBoot = true;
|
enableOnBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
oci-containers = {
|
||||||
|
backend = "docker";
|
||||||
|
containers = {
|
||||||
|
gluetun = {
|
||||||
|
image = "qmcgaw/gluetun";
|
||||||
|
capabilities = {
|
||||||
|
NET_ADMIN = true;
|
||||||
|
};
|
||||||
|
devices = [ "/dev/net/tun" ];
|
||||||
|
environmentFiles = [ "/etc/secrets/gluetun.env" ];
|
||||||
|
ports = [
|
||||||
|
"${toString ports.qb}:${toString ports.qb}"
|
||||||
|
];
|
||||||
|
# VPN_SERVICE_PROVIDER=protonvpn
|
||||||
|
# VPN_TYPE=wireguard
|
||||||
|
# WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU
|
||||||
|
# SERVER_COUNTRIES=Denmark
|
||||||
|
environment = {
|
||||||
|
VPN_PORT_FORWARDING = "on";
|
||||||
|
# TOR_ONLY = "on";
|
||||||
|
PORT_FORWARD_ONLY = "on";
|
||||||
|
FIREWALL_OUTBOUND_SUBNETS = "192.168.1.0/24,100.64.0.0/10";
|
||||||
|
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'
|
||||||
|
'';
|
||||||
|
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'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
# extraOptions = [ "--network=host" ];
|
||||||
|
};
|
||||||
|
qbittorrent = {
|
||||||
|
image = "lscr.io/linuxserver/qbittorrent";
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
WEBUI_PORT = toString ports.qb;
|
||||||
|
};
|
||||||
|
|
||||||
|
volumes = [ "/media/large/downloads:/large" ];
|
||||||
|
|
||||||
|
extraOptions = [ "--network=container:gluetun" ];
|
||||||
|
};
|
||||||
|
prometheus-qb = {
|
||||||
|
image = "ghcr.io/esanchezm/prometheus-qbittorrent-exporter";
|
||||||
|
environment = {
|
||||||
|
QBITTORRENT_PORT = toString ports.qb;
|
||||||
|
QBITTORRENT_HOST = "localhost";
|
||||||
|
EXPORTER_PORT = toString internalPorts.prometheus-qb;
|
||||||
|
};
|
||||||
|
extraOptions = [ "--network=host" ];
|
||||||
|
# ports = [ "8000:${toString internalPorts.prometheus-qb}" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
# hardware.nvidia-container-toolkit.enable = true;
|
# hardware.nvidia-container-toolkit.enable = true;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
|
|
||||||
|
|
@ -10,29 +10,10 @@
|
||||||
"first-day-of-week" = "monday";
|
"first-day-of-week" = "monday";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "rss";
|
type = "server-stats";
|
||||||
limit = 10;
|
servers = [
|
||||||
"collapse-after" = 3;
|
|
||||||
cache = "12h";
|
|
||||||
feeds = [
|
|
||||||
{
|
{
|
||||||
url = "https://selfh.st/rss/";
|
type = "local";
|
||||||
title = "selfh.st";
|
|
||||||
limit = 4;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
url = "https://ciechanow.ski/atom.xml";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
url = "https://www.joshwcomeau.com/rss.xml";
|
|
||||||
title = "Josh Comeau";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
url = "https://samwho.dev/rss.xml";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
url = "https://ishadeed.com/feed.xml";
|
|
||||||
title = "Ahmad Shadeed";
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -116,30 +97,56 @@
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "videos";
|
type = "monitor";
|
||||||
channels = [
|
cache = "1m";
|
||||||
"UCXuqSBlHAE6Xw-yeJA0Tunw" # Linus Tech Tips
|
title = "Services";
|
||||||
"UCR-DXc1voovS8nhAvccRZhg" # Jeff Geerling
|
|
||||||
"UCsBjURrPoezykLs9EqgamOA" # Fireship
|
sites = [
|
||||||
"UCBJycsmduvYEL83R_U4JriQ" # Marques Brownlee
|
{
|
||||||
"UCHnyfMqiRRG1u-2MsSQLbXA" # Veritasium
|
title = "Jellyfin";
|
||||||
];
|
url = "http://jellyfin.eisen.danbulant.cloud";
|
||||||
|
icon = "si:jellyfin";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "group";
|
title = "qBittorrent";
|
||||||
widgets = [
|
url = "http://qb.eisen.danbulant.cloud";
|
||||||
{
|
icon = "si:qbittorrent";
|
||||||
type = "reddit";
|
|
||||||
subreddit = "technology";
|
|
||||||
"show-thumbnails" = true;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "reddit";
|
title = "Radarr";
|
||||||
subreddit = "selfhosted";
|
url = "http://radarr.eisen.danbulant.cloud";
|
||||||
"show-thumbnails" = true;
|
icon = "si:radarr";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Sonarr";
|
||||||
|
url = "http://sonarr.eisen.danbulant.cloud";
|
||||||
|
icon = "si:sonarr";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Vaultwarden";
|
||||||
|
url = "https://vaultwarden.danbulant.cloud";
|
||||||
|
icon = "si:vaultwarden";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Nextcloud";
|
||||||
|
url = "https://direct.danbulant.cloud";
|
||||||
|
icon = "si:nextcloud";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Grafana";
|
||||||
|
url = "http://grafana.eisen.danbulant.cloud";
|
||||||
|
icon = "si:grafana";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Karakeep";
|
||||||
|
url = "http://keep.eisen.danbulant.cloud";
|
||||||
|
icon = "si:karakeep";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
# {
|
||||||
|
# type = "docker-containers";
|
||||||
|
# }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -165,56 +172,22 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "custom-api";
|
type = "custom-api";
|
||||||
title = "Epic Games";
|
title = "Steam specials";
|
||||||
cache = "1h";
|
cache = "12h";
|
||||||
url = "https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=en&country=US&allowCountries=US";
|
url = "https://store.steampowered.com/api/featuredcategories?cc=us";
|
||||||
template = ''
|
template = ''
|
||||||
<div>
|
<ul class="list list-gap-10 collapsible-container" data-collapse-after="5">
|
||||||
{{ if eq .Response.StatusCode 200 }}
|
{{ range .JSON.Array "specials.items" }}
|
||||||
<div class="horizontal-cards-2">
|
<li>
|
||||||
{{ range .JSON.Array "data.Catalog.searchStore.elements" }}
|
<a class="size-h4 color-highlight block text-truncate" href="https://store.steampowered.com/app/{{ .Int "id" }}/">{{ .String "name" }}</a>
|
||||||
{{ $price := .String "price.totalPrice.discountPrice" }}
|
<ul class="list-horizontal-text">
|
||||||
{{ $hasPromo := gt (len (.Array "promotions.promotionalOffers")) 0 }}
|
<li>{{ div (.Int "final_price" | toFloat) 100 | printf "$%.2f" }}</li>
|
||||||
{{ if and $hasPromo (eq $price "0") }}
|
{{ $discount := .Int "discount_percent" }}
|
||||||
{{ $gamePage := .String "productSlug" }}
|
<li{{ if ge $discount 40 }} class="color-positive"{{ end }}>{{ $discount }}% off</li>
|
||||||
{{ if gt (len (.Array "offerMappings")) 0 }}
|
</ul>
|
||||||
{{ $gamePage = .String "offerMappings.0.pageSlug" }}
|
</li>
|
||||||
{{end }}
|
|
||||||
<a href="https://store.epicgames.com/en-US/p/{{ $gamePage }}" target="_blank" class="card">
|
|
||||||
{{ $title := .String "title" }}
|
|
||||||
{{ range .Array "keyImages" }}
|
|
||||||
{{ if eq (.String "type") "OfferImageWide" }}
|
|
||||||
<img src="{{ .String "url" }}" alt="{{ $title }}" style="width: 100%; max-width: 300px; height: 150px; object-fit: cover; border-radius: var(--border-radius);">
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
</ul>
|
||||||
<div class="card-content">
|
|
||||||
<span class="size-base color-primary">{{ $title }}</span><br>
|
|
||||||
<span class="size-h5 color-subdue">
|
|
||||||
{{ if $hasPromo }}
|
|
||||||
{{ $promotions := .Array "promotions.promotionalOffers" }}
|
|
||||||
{{ if gt (len $promotions) 0 }}
|
|
||||||
{{ $firstPromo := index $promotions 0 }}
|
|
||||||
{{ $offers := $firstPromo.Array "promotionalOffers" }}
|
|
||||||
{{ if gt (len $offers) 0 }}
|
|
||||||
{{ $firstOffer := index $offers 0 }}
|
|
||||||
Free until {{ slice ($firstOffer.String "endDate") 0 10 }}
|
|
||||||
{{ else }}
|
|
||||||
Free this week!
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
Free this week!
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ else }}
|
|
||||||
<p class="color-negative">Error fetching Epic Games data.</p>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ in
|
||||||
stateVersion = "25.11";
|
stateVersion = "25.11";
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
ddcutil
|
||||||
unstable.gearlever
|
unstable.gearlever
|
||||||
linux-wallpaperengine
|
linux-wallpaperengine
|
||||||
lmstudio
|
lmstudio
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue