From 7f5566f3096ef38e273f60344336a8817f7dcf2c Mon Sep 17 00:00:00 2001 From: muon Date: Sat, 24 May 2025 09:56:56 +0000 Subject: [PATCH 1/4] Update nix --- hosts/muho/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/muho/configuration.nix b/hosts/muho/configuration.nix index 6664a05..a404cc7 100644 --- a/hosts/muho/configuration.nix +++ b/hosts/muho/configuration.nix @@ -40,7 +40,7 @@ in { mods.server.vault.enable = true; mods.server.git.enable = true; mods.server.cal.enable = true; - mods.server.chat.enable = true; + mods.server.chat.enable = false; mods.server.ntfy.enable = true; mods.server.lemmy.enable = true; From 961a284dbaeeb28fa90d827a3145180c0c4980b4 Mon Sep 17 00:00:00 2001 From: muon Date: Wed, 28 May 2025 14:02:11 +0000 Subject: [PATCH 2/4] Add valheim mods --- _sources/generated.json | 70 +++++++++++++++++++++++++++++++++++++++++ _sources/generated.nix | 40 +++++++++++++++++++++++ nvfetcher.toml | 25 +++++++++++++++ 3 files changed, 135 insertions(+) diff --git a/_sources/generated.json b/_sources/generated.json index 15e0eca..8667049 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -13,6 +13,20 @@ }, "version": "1.6.6" }, + "valheim.arearepair": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.arearepair", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-5eRobZrlGB5ECpyXldYMOt+0xKzU9rBeCSVPIs3PZd8=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Azumatt/AzuAreaRepair/1.1.6/" + }, + "version": "1.1.6" + }, "valheim.autostore": { "cargoLocks": null, "date": null, @@ -27,6 +41,20 @@ }, "version": "3.0.8" }, + "valheim.backpacks": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.backpacks", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-xSfcLisLLPALx6l1Rtbt10YFUo112HV2I6BO/zCjr5w=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Smoothbrain/Backpacks/1.3.6/" + }, + "version": "1.3.6" + }, "valheim.betternetworking": { "cargoLocks": null, "date": null, @@ -111,6 +139,20 @@ }, "version": "2.25.0" }, + "valheim.mining": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.mining", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-SxQ+Z4T5Hg5w4X4+L++eArWZXhoXuarecKl6gdpcpNQ=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Smoothbrain/Mining/1.1.5/" + }, + "version": "1.1.5" + }, "valheim.multiuserchest": { "cargoLocks": null, "date": null, @@ -125,6 +167,20 @@ }, "version": "0.6.1" }, + "valheim.planteasily": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.planteasily", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-HvjwiVBWs723LhHR7Xk6knugOU8eQewGiV+mZaAN5YU=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Advize/PlantEasily/2.0.3/" + }, + "version": "2.0.3" + }, "valheim.quickteleport": { "cargoLocks": null, "date": null, @@ -209,6 +265,20 @@ }, "version": "1.3.8" }, + "valheim.swimequip": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.swimequip", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-UotiInuJAZsR1sL9aquTBQf7sw5kzG+2fG8QlFl+2Fc=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/blacks7ar/WieldEquipmentWhileSwimming/1.1.2/" + }, + "version": "1.1.2" + }, "vesktop.micfix": { "cargoLocks": null, "date": null, diff --git a/_sources/generated.nix b/_sources/generated.nix index 90419fd..c7c9a7b 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -9,6 +9,14 @@ sha256 = "sha256-cObo71X0wOzW3pZwAy7/dh7IRghu7EMPw7vWuoPWPlk="; }; }; + "valheim.arearepair" = { + pname = "valheim.arearepair"; + version = "1.1.6"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Azumatt/AzuAreaRepair/1.1.6/"; + sha256 = "sha256-5eRobZrlGB5ECpyXldYMOt+0xKzU9rBeCSVPIs3PZd8="; + }; + }; "valheim.autostore" = { pname = "valheim.autostore"; version = "3.0.8"; @@ -17,6 +25,14 @@ sha256 = "sha256-ooghhDinwLTwEpTTQFj/brdb9Yj5aLGr+zYsjrsq9A0="; }; }; + "valheim.backpacks" = { + pname = "valheim.backpacks"; + version = "1.3.6"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Smoothbrain/Backpacks/1.3.6/"; + sha256 = "sha256-xSfcLisLLPALx6l1Rtbt10YFUo112HV2I6BO/zCjr5w="; + }; + }; "valheim.betternetworking" = { pname = "valheim.betternetworking"; version = "2.3.2"; @@ -65,6 +81,14 @@ sha256 = "sha256-Tso4/Sf4Evt5kpBrVqZrjE9Qs2MSZV04WB1w+uX+TX8="; }; }; + "valheim.mining" = { + pname = "valheim.mining"; + version = "1.1.5"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Smoothbrain/Mining/1.1.5/"; + sha256 = "sha256-SxQ+Z4T5Hg5w4X4+L++eArWZXhoXuarecKl6gdpcpNQ="; + }; + }; "valheim.multiuserchest" = { pname = "valheim.multiuserchest"; version = "0.6.1"; @@ -73,6 +97,14 @@ sha256 = "sha256-PhXW6vBtEMnhE93RAALEucPU9q3VpdMrooFawWYXl2A="; }; }; + "valheim.planteasily" = { + pname = "valheim.planteasily"; + version = "2.0.3"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Advize/PlantEasily/2.0.3/"; + sha256 = "sha256-HvjwiVBWs723LhHR7Xk6knugOU8eQewGiV+mZaAN5YU="; + }; + }; "valheim.quickteleport" = { pname = "valheim.quickteleport"; version = "1.1.0"; @@ -121,6 +153,14 @@ sha256 = "sha256-QCEYnx0I6onWEAJy851wS0WdC35L18DyJL1wAAwHFaU="; }; }; + "valheim.swimequip" = { + pname = "valheim.swimequip"; + version = "1.1.2"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/blacks7ar/WieldEquipmentWhileSwimming/1.1.2/"; + sha256 = "sha256-UotiInuJAZsR1sL9aquTBQf7sw5kzG+2fG8QlFl+2Fc="; + }; + }; "vesktop.micfix" = { pname = "vesktop.micfix"; version = "1.0.1"; diff --git a/nvfetcher.toml b/nvfetcher.toml index dc06315..540646f 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -17,6 +17,11 @@ src.webpage = "https://thunderstore.io/c/valheim/p/Azumatt/AzuAutoStore/" src.regex = "v(\\d+\\.\\d+\\.\\d+)" fetch.tarball = "https://thunderstore.io/package/download/Azumatt/AzuAutoStore/$ver/" +["valheim.arearepair"] +src.webpage = "https://thunderstore.io/c/valheim/p/Azumatt/AzuAreaRepair/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Azumatt/AzuAreaRepair/$ver/" + ["valheim.extendedinv"] src.webpage = "https://thunderstore.io/c/valheim/p/Azumatt/AzuExtendedPlayerInventory/" src.regex = "v(\\d+\\.\\d+\\.\\d+)" @@ -57,6 +62,11 @@ src.webpage = "https://thunderstore.io/c/valheim/p/blacks7ar/VikingsDoSwim/" src.regex = "v(\\d+\\.\\d+\\.\\d+)" fetch.tarball = "https://thunderstore.io/package/download/blacks7ar/VikingsDoSwim/$ver/" +["valheim.swimequip"] +src.webpage = "https://thunderstore.io/c/valheim/p/blacks7ar/WieldEquipmentWhileSwimming/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/blacks7ar/WieldEquipmentWhileSwimming/$ver/" + ["valheim.seedbed"] src.webpage = "https://thunderstore.io/c/valheim/p/blacks7ar/SeedBed/" src.regex = "v(\\d+\\.\\d+\\.\\d+)" @@ -72,6 +82,21 @@ src.webpage = "https://thunderstore.io/c/valheim/p/Smoothbrain/SmoothSave/" src.regex = "v(\\d+\\.\\d+\\.\\d+)" fetch.tarball = "https://thunderstore.io/package/download/Smoothbrain/SmoothSave/$ver/" +["valheim.backpacks"] +src.webpage = "https://thunderstore.io/c/valheim/p/Smoothbrain/Backpacks/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Smoothbrain/Backpacks/$ver/" + +["valheim.mining"] +src.webpage = "https://thunderstore.io/c/valheim/p/Smoothbrain/Mining/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Smoothbrain/Mining/$ver/" + +["valheim.planteasily"] +src.webpage = "https://thunderstore.io/c/valheim/p/Advize/PlantEasily/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Advize/PlantEasily/$ver/" + ["valheim.betternetworking"] src.webpage = "https://thunderstore.io/c/valheim/p/CW_Jesse/BetterNetworking_Valheim/" src.regex = "v(\\d+\\.\\d+\\.\\d+)" From 2cbf65611f8178f1402c78142f7bc440b74d79e1 Mon Sep 17 00:00:00 2001 From: muon Date: Thu, 29 May 2025 08:57:35 +0000 Subject: [PATCH 3/4] Add audiobookshelf --- hosts/muho/configuration.nix | 1 + hosts/ports.nix | 5 +++ modules/nixos/server/audio.nix | 57 ++++++++++++++++++++++++++++++++ modules/nixos/server/default.nix | 1 + 4 files changed, 64 insertions(+) create mode 100644 modules/nixos/server/audio.nix diff --git a/hosts/muho/configuration.nix b/hosts/muho/configuration.nix index a404cc7..cb1960b 100644 --- a/hosts/muho/configuration.nix +++ b/hosts/muho/configuration.nix @@ -43,6 +43,7 @@ in { mods.server.chat.enable = false; mods.server.ntfy.enable = true; mods.server.lemmy.enable = true; + mods.server.audio.enable = true; mods.server.dash.enable = false; mods.server.nginx.ports.dash = 3009; diff --git a/hosts/ports.nix b/hosts/ports.nix index 215d18f..537e89b 100644 --- a/hosts/ports.nix +++ b/hosts/ports.nix @@ -17,6 +17,7 @@ chat = 3008; # dash = 3009; ntfy = 3010; + audio = 3011; search = 8081; videos = 8082; @@ -27,6 +28,10 @@ lemmy-api = 5002; lemmy-ui = 5003; pict-rs = 5004; + readarr = 5005; + prowlarr = 5006; + flaresolverr = 5007; + torrent = 5008; }; }; } diff --git a/modules/nixos/server/audio.nix b/modules/nixos/server/audio.nix new file mode 100644 index 0000000..8b1af15 --- /dev/null +++ b/modules/nixos/server/audio.nix @@ -0,0 +1,57 @@ +{ pkgs, lib, config, ... }: +let + cfg = config.mods.server.audio; + arr.read.port = config.mods.server.local.ports.readarr; + arr.prowl.port = config.mods.server.local.ports.prowlarr; + arr.flare.port = config.mods.server.local.ports.flaresolverr; + arr.torrent.port = config.mods.server.local.ports.torrent; + port = config.mods.server.nginx.ports.audio; +in with lib; { + options.mods.server = { + audio = { + enable = mkEnableOption { + default = false; + description = "enables audiobook servers"; + }; + }; + }; + + config = mkIf cfg.enable { + services.readarr = { + enable = true; + openFirewall = true; + settings.server.port = arr.read.port; + }; + + services.prowlarr = { + enable = true; + openFirewall = true; + settings.server.port = arr.prowl.port; + }; + + services.flaresolverr = { + enable = true; + openFirewall = true; + port = arr.flare.port; + }; + + services.transmission = { + enable = true; + openFirewall = true; + openRPCPort = true; + port = arr.torrent.port; + settings = { + download-dir = "/storage1/download"; + rpc-port = arr.torrent.port; + rpc-bind-address = "0.0.0.0"; + }; + }; + + services.audiobookshelf = { + inherit port; + enable = true; + openFirewall = true; + host = "0.0.0.0"; + }; + }; +} diff --git a/modules/nixos/server/default.nix b/modules/nixos/server/default.nix index 3d1168e..a142aa4 100644 --- a/modules/nixos/server/default.nix +++ b/modules/nixos/server/default.nix @@ -23,5 +23,6 @@ ./nvr.nix ./ntfy.nix ./lemmy.nix + ./audio.nix ]; } From 93b29996bb47a31fdf7f645566638125633fe9b6 Mon Sep 17 00:00:00 2001 From: mups Date: Thu, 29 May 2025 09:15:35 +0000 Subject: [PATCH 4/4] Remove swap --- hosts/mups/hardware-configuration.nix | 42 +++++++++++++++------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/hosts/mups/hardware-configuration.nix b/hosts/mups/hardware-configuration.nix index b66db4f..c71c836 100644 --- a/hosts/mups/hardware-configuration.nix +++ b/hosts/mups/hardware-configuration.nix @@ -1,4 +1,5 @@ -{ config, lib, pkgs, modulesPath, ... }: let +{ config, lib, pkgs, modulesPath, ... }: +let ip = "93.95.230.11"; gateway = "93.95.230.1"; hostname = "vpsorvhm2v"; @@ -6,33 +7,38 @@ dns1 = "93.95.224.29"; in { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.availableKernelModules = + [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/031e2049-33ed-4d21-a208-8da3fc250260"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/031e2049-33ed-4d21-a208-8da3fc250260"; + fsType = "ext4"; + }; - swapDevices = [{ - device = "/dev/disk/by-uuid/bc6acd1f-98bb-4f94-b52c-40aa7312e838"; - } { - device = "/var/lib/swapfile"; - size = 2*1024; - }]; + # swapDevices = [{ + # device = "/dev/disk/by-uuid/bc6acd1f-98bb-4f94-b52c-40aa7312e838"; + # } { + # device = "/var/lib/swapfile"; + # size = 2*1024; + # }]; networking.useDHCP = lib.mkForce false; networking.domain = ""; - networking.interfaces.ens3.ipv4.addresses = [{ address = ip; prefixLength = 24; }]; - networking.defaultGateway = { address = gateway; interface = "ens3"; }; - networking.nameservers = [ dns0 dns1 ]; + networking.interfaces.ens3.ipv4.addresses = [{ + address = ip; + prefixLength = 24; + }]; + networking.defaultGateway = { + address = gateway; + interface = "ens3"; + }; + networking.nameservers = [ dns0 dns1 ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }