From 9cac325698ea61b98251324652109cdc93d2e181 Mon Sep 17 00:00:00 2001 From: marty Date: Tue, 19 May 2026 12:48:51 +0200 Subject: [PATCH] stump --- flake.lock | 89 ++++++++++++++++++++++++++---- flake.nix | 4 ++ home/apps/internet/zen-browser.nix | 1 + hosts/marty-latitude/options.nix | 3 + hosts/marty-pc/options.nix | 1 + modules/device/server.nix | 2 +- modules/server/media/default.nix | 2 +- modules/server/media/kavita.nix | 49 ---------------- modules/server/media/stump.nix | 20 +++++++ 9 files changed, 110 insertions(+), 61 deletions(-) delete mode 100644 modules/server/media/kavita.nix create mode 100644 modules/server/media/stump.nix diff --git a/flake.lock b/flake.lock index 05a6699..2b76e08 100644 --- a/flake.lock +++ b/flake.lock @@ -146,6 +146,24 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "inputs": { "systems": [ "swayfx", @@ -695,6 +713,22 @@ } }, "nixpkgs_6": { + "locked": { + "lastModified": 1773375660, + "narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { "locked": { "lastModified": 1775710090, "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=", @@ -812,6 +846,7 @@ "nixos-cli": "nixos-cli", "nixpkgs": "nixpkgs_5", "noctalia": "noctalia", + "stump-nix": "stump-nix", "swayfx": "swayfx", "walker": "walker", "zen-browser": "zen-browser" @@ -827,7 +862,7 @@ "swayfx", "nixpkgs" ], - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1771859266, @@ -843,14 +878,33 @@ "type": "github" } }, - "swayfx": { + "stump-nix": { "inputs": { "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1774882209, + "narHash": "sha256-H7NI8B3NsZRJEb8a4v2MK3UTc39oGT4XB1PtLoE7Af8=", + "owner": "bct", + "repo": "stump-nix", + "rev": "d9fa412abd927a45890460d371c25f22aa99feb5", + "type": "github" + }, + "original": { + "owner": "bct", + "repo": "stump-nix", + "type": "github" + } + }, + "swayfx": { + "inputs": { + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ], "scenefx": "scenefx", - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1776138006, @@ -928,16 +982,16 @@ }, "systems_5": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -971,6 +1025,21 @@ "type": "github" } }, + "systems_8": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -998,8 +1067,8 @@ "elephant": [ "elephant" ], - "nixpkgs": "nixpkgs_6", - "systems": "systems_7" + "nixpkgs": "nixpkgs_7", + "systems": "systems_8" }, "locked": { "lastModified": 1775815794, diff --git a/flake.nix b/flake.nix index 1121187..f66dce0 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,9 @@ url = "github:noctalia-dev/noctalia-shell"; inputs.nixpkgs.follows = "nixpkgs"; }; + stump-nix = { + url = "github:bct/stump-nix"; + }; }; outputs = @@ -46,6 +49,7 @@ zen-browser, agenix, swayfx, + stump-nix, ... }: let diff --git a/home/apps/internet/zen-browser.nix b/home/apps/internet/zen-browser.nix index a6e6c30..b5ecfc0 100644 --- a/home/apps/internet/zen-browser.nix +++ b/home/apps/internet/zen-browser.nix @@ -54,6 +54,7 @@ let (extension "peertube-companion" "peertube-companion@booteille") (extension "peertubeify" "{01175c8e-4506-4263-bad9-d3ddfd4f5a5f}") (extension "peertube-picks" "{937c0767-0608-41e2-917a-8bf06601275a}") + (extension "vimium-ff" "{d7742d87-e61d-4b78-b8a1-b469842139fa}") # ... ]; diff --git a/hosts/marty-latitude/options.nix b/hosts/marty-latitude/options.nix index 23f349b..d6e0928 100644 --- a/hosts/marty-latitude/options.nix +++ b/hosts/marty-latitude/options.nix @@ -6,6 +6,9 @@ }: { + imports = [ + ../../modules/device/laptop.nix + ]; config = { user = { userName = "marty"; diff --git a/hosts/marty-pc/options.nix b/hosts/marty-pc/options.nix index 9eb7252..6ed88d2 100644 --- a/hosts/marty-pc/options.nix +++ b/hosts/marty-pc/options.nix @@ -20,6 +20,7 @@ locale = "de_DE.UTF-8"; hostname = "marty-pc"; }; + server.media.stump.enable = true; apps = { audio = { base.enable = true; diff --git a/modules/device/server.nix b/modules/device/server.nix index 1908981..d870498 100644 --- a/modules/device/server.nix +++ b/modules/device/server.nix @@ -30,7 +30,7 @@ enable = true; public = false; }; - kavita = { + stump = { enable = true; public = false; }; diff --git a/modules/server/media/default.nix b/modules/server/media/default.nix index dd099ee..ba13018 100644 --- a/modules/server/media/default.nix +++ b/modules/server/media/default.nix @@ -8,7 +8,7 @@ { imports = [ ./jellyfin.nix - ./kavita.nix + ./stump.nix ./navidrome.nix ]; } diff --git a/modules/server/media/kavita.nix b/modules/server/media/kavita.nix deleted file mode 100644 index c9521c6..0000000 --- a/modules/server/media/kavita.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -{ - options = { - server.media.kavita = { - enable = lib.mkEnableOption "enable kavita"; - port = lib.mkOption { - default = 3812; - description = "kavita port"; - }; - public = lib.mkEnableOption "make kavita public"; - subdomain = lib.mkOption { - default = "books"; - description = "kavita subdomain"; - }; - }; - }; - config = { - services = { - kavita = { - enable = config.server.media.kavita.enable; - tokenKeyFile = "/home/${config.user.userName}/secrets/kavita"; - settings = { - Port = config.server.media.kavita.port; - }; - }; - nginx = { - virtualHosts = { - "${config.server.media.kavita.subdomain}.${config.networking.domain}" = - if config.server.media.kavita.public then - { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.server.media.kavita.port}"; - }; - } - else - { }; - }; - }; - }; - }; -} diff --git a/modules/server/media/stump.nix b/modules/server/media/stump.nix new file mode 100644 index 0000000..eca02cf --- /dev/null +++ b/modules/server/media/stump.nix @@ -0,0 +1,20 @@ +{ inputs, ... }: +{ + options = { + server.media.stump = { + enable = lib.mkEnableOption "enable stump"; + public = lib.mkEnableOption "make stump public"; + }; + }; + + imports = [ inputs.stump-nix.nixosModules.stump ]; + + config = { + services.stump = { + enable = true; + environment = { + STUMP_PORT = "10801"; + }; + }; + }; +}