From a6587b1a55d70b97f00a8f55ffd2745655a1e571 Mon Sep 17 00:00:00 2001 From: muon Date: Fri, 23 May 2025 16:14:29 +0000 Subject: [PATCH 1/9] Add valheim mods --- hosts/muho/configuration.nix | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/hosts/muho/configuration.nix b/hosts/muho/configuration.nix index b28d2d1..15d46e7 100644 --- a/hosts/muho/configuration.nix +++ b/hosts/muho/configuration.nix @@ -74,6 +74,74 @@ in { worldName = "Smorld"; openFirewall = true; password = "notbeempty"; + bepinexMods = [ + (pkgs.fetchValheimThunderstoreMod { + owner = "ValheimModding"; + name = "Jotunn"; + version = "2.25.0"; + hash = "sha256-Tso4/Sf4Evt5kpBrVqZrjE9Qs2MSZV04WB1w+uX+TX8="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "AzuCraftyBoxes"; + version = "1.8.4"; + hash = "sha256-8bvHmONHuc9K0cgT42+W4oxQ6MusAv8v0IIVMerdYSA="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "AzuAutoStore"; + version = "3.0.8"; + hash = "sha256-ooghhDinwLTwEpTTQFj/brdb9Yj5aLGr+zYsjrsq9A0="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "AzuExtendedPlayerInventory"; + version = "1.4.9"; + hash = "sha256-Xd7KdUm3c14iQBST31DAqs+bQF9hwYhUxE66o3lusrA="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "Recycle_N_Reclaim"; + version = "1.3.6"; + hash = "sha256-2cWdmspwid2h1ekfDFAngN25402pQnxZQhm4rX6BNhw="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "AAA_Crafting"; + version = "1.6.6"; + hash = "sha256-cObo71X0wOzW3pZwAy7/dh7IRghu7EMPw7vWuoPWPlk="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "OdinPlus"; + name = "OdinCampsite"; + version = "1.5.8"; + hash = "sha256-r3HTjfNy7ehr6bsjddr6mTA7T8VVXRhDfulIodjc0jc="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "MSchmoecker"; + name = "MultiUserChest"; + version = "0.6.1"; + hash = "sha256-PhXW6vBtEMnhE93RAALEucPU9q3VpdMrooFawWYXl2A="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Advize"; + name = "CartographySkill"; + version = "3.0.1"; + hash = "sha256-u20BTiyF4e6QJ6OUK5migjdEpyzIGRDxLPJ3NdZNhvA="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "blacks7ar"; + name = "VikingsDoSwim"; + version = "1.3.8"; + hash = "sha256-QCEYnx0I6onWEAJy851wS0WdC35L18DyJL1wAAwHFaU="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "blacks7ar"; + name = "SeedBed"; + version = "1.2.7"; + hash = "sha256-wm2gGSyMQ6r3lLpbpXtZYG7s+fFYvw5nZGmSW54Ayt4="; + }) + ]; }; # Hardware preferences From 38203669ebbc6293848ddaa0f40c6f0f434cbd56 Mon Sep 17 00:00:00 2001 From: muon Date: Fri, 23 May 2025 18:54:56 +0000 Subject: [PATCH 2/9] Add valheim to unfree --- hosts/muho/configuration.nix | 83 +--------------------- modules/nixos/unfree/default.nix | 4 +- modules/nixos/unfree/valheim.nix | 117 +++++++++++++++++++++++++++++++ utils.nix | 1 - 4 files changed, 120 insertions(+), 85 deletions(-) create mode 100644 modules/nixos/unfree/valheim.nix diff --git a/hosts/muho/configuration.nix b/hosts/muho/configuration.nix index 15d46e7..6664a05 100644 --- a/hosts/muho/configuration.nix +++ b/hosts/muho/configuration.nix @@ -59,91 +59,10 @@ in { mods.unfree.steam.enable = false; mods.unfree.nvidia.enable = false; mods.unfree.minecraft.enable = false; + mods.unfree.valheim.enable = true; mods.server.vrising.enable = false; - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "valheim-server" - "steamworks-sdk-redist" - ]; - - services.valheim = { - enable = true; - serverName = "Smorld"; - worldName = "Smorld"; - openFirewall = true; - password = "notbeempty"; - bepinexMods = [ - (pkgs.fetchValheimThunderstoreMod { - owner = "ValheimModding"; - name = "Jotunn"; - version = "2.25.0"; - hash = "sha256-Tso4/Sf4Evt5kpBrVqZrjE9Qs2MSZV04WB1w+uX+TX8="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "AzuCraftyBoxes"; - version = "1.8.4"; - hash = "sha256-8bvHmONHuc9K0cgT42+W4oxQ6MusAv8v0IIVMerdYSA="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "AzuAutoStore"; - version = "3.0.8"; - hash = "sha256-ooghhDinwLTwEpTTQFj/brdb9Yj5aLGr+zYsjrsq9A0="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "AzuExtendedPlayerInventory"; - version = "1.4.9"; - hash = "sha256-Xd7KdUm3c14iQBST31DAqs+bQF9hwYhUxE66o3lusrA="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "Recycle_N_Reclaim"; - version = "1.3.6"; - hash = "sha256-2cWdmspwid2h1ekfDFAngN25402pQnxZQhm4rX6BNhw="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "AAA_Crafting"; - version = "1.6.6"; - hash = "sha256-cObo71X0wOzW3pZwAy7/dh7IRghu7EMPw7vWuoPWPlk="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "OdinPlus"; - name = "OdinCampsite"; - version = "1.5.8"; - hash = "sha256-r3HTjfNy7ehr6bsjddr6mTA7T8VVXRhDfulIodjc0jc="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "MSchmoecker"; - name = "MultiUserChest"; - version = "0.6.1"; - hash = "sha256-PhXW6vBtEMnhE93RAALEucPU9q3VpdMrooFawWYXl2A="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Advize"; - name = "CartographySkill"; - version = "3.0.1"; - hash = "sha256-u20BTiyF4e6QJ6OUK5migjdEpyzIGRDxLPJ3NdZNhvA="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "blacks7ar"; - name = "VikingsDoSwim"; - version = "1.3.8"; - hash = "sha256-QCEYnx0I6onWEAJy851wS0WdC35L18DyJL1wAAwHFaU="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "blacks7ar"; - name = "SeedBed"; - version = "1.2.7"; - hash = "sha256-wm2gGSyMQ6r3lLpbpXtZYG7s+fFYvw5nZGmSW54Ayt4="; - }) - ]; - }; - # Hardware preferences ## Mouse diff --git a/modules/nixos/unfree/default.nix b/modules/nixos/unfree/default.nix index adeea05..d9f045f 100644 --- a/modules/nixos/unfree/default.nix +++ b/modules/nixos/unfree/default.nix @@ -4,10 +4,10 @@ let mkPackages = mod: if cfg.${mod}.enable then cfg.${mod}.packages else [ ]; in { - imports = [ ./steam.nix ./nvidia.nix ./minecraft.nix ]; + imports = [ ./steam.nix ./nvidia.nix ./minecraft.nix ./valheim.nix ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ((mkPackages "steam") ++ (mkPackages "minecraft") ++ (mkPackages "nvidia") - ++ [ "stremio-shell" "stremio-server" ]); + ++ (mkPackages "valheim") ++ [ "stremio-shell" "stremio-server" ]); } diff --git a/modules/nixos/unfree/valheim.nix b/modules/nixos/unfree/valheim.nix new file mode 100644 index 0000000..8f512e3 --- /dev/null +++ b/modules/nixos/unfree/valheim.nix @@ -0,0 +1,117 @@ +{ pkgs, lib, config, inputs, ... }: { + options.mods.unfree.valheim = { + enable = lib.mkEnableOption { + default = false; + description = "enables valheim server"; + }; + packages = lib.mkOption { + default = [ "valheim-server" "steamworks-sdk-redist" ]; + description = "unfree packages"; + }; + }; + + imports = [ inputs.valheim-server.nixosModules.default ]; + + config = lib.mkIf config.mods.unfree.valheim.enable { + services.valheim = { + enable = true; + serverName = "Smorld"; + worldName = "Smorld"; + openFirewall = true; + password = "notbeempty"; + bepinexMods = [ + (pkgs.fetchValheimThunderstoreMod { + owner = "ValheimModding"; + name = "Jotunn"; + version = "2.25.0"; + hash = "sha256-Tso4/Sf4Evt5kpBrVqZrjE9Qs2MSZV04WB1w+uX+TX8="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "AzuCraftyBoxes"; + version = "1.8.4"; + hash = "sha256-8bvHmONHuc9K0cgT42+W4oxQ6MusAv8v0IIVMerdYSA="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "AzuAutoStore"; + version = "3.0.8"; + hash = "sha256-ooghhDinwLTwEpTTQFj/brdb9Yj5aLGr+zYsjrsq9A0="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "AzuExtendedPlayerInventory"; + version = "1.4.9"; + hash = "sha256-Xd7KdUm3c14iQBST31DAqs+bQF9hwYhUxE66o3lusrA="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "Recycle_N_Reclaim"; + version = "1.3.6"; + hash = "sha256-2cWdmspwid2h1ekfDFAngN25402pQnxZQhm4rX6BNhw="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Azumatt"; + name = "AAA_Crafting"; + version = "1.6.6"; + hash = "sha256-cObo71X0wOzW3pZwAy7/dh7IRghu7EMPw7vWuoPWPlk="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "OdinPlus"; + name = "OdinCampsite"; + version = "1.5.8"; + hash = "sha256-r3HTjfNy7ehr6bsjddr6mTA7T8VVXRhDfulIodjc0jc="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "OdinPlus"; + name = "QuickTeleport"; + version = "1.1.0"; + hash = "sha256-YSAVthV994do/atQA+wGfillXeSYFlLJK6VyMcQNVKE="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "MSchmoecker"; + name = "MultiUserChest"; + version = "0.6.1"; + hash = "sha256-PhXW6vBtEMnhE93RAALEucPU9q3VpdMrooFawWYXl2A="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Advize"; + name = "CartographySkill"; + version = "3.0.1"; + hash = "sha256-u20BTiyF4e6QJ6OUK5migjdEpyzIGRDxLPJ3NdZNhvA="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "blacks7ar"; + name = "VikingsDoSwim"; + version = "1.3.8"; + hash = "sha256-QCEYnx0I6onWEAJy851wS0WdC35L18DyJL1wAAwHFaU="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "blacks7ar"; + name = "SeedBed"; + version = "1.2.7"; + hash = "sha256-wm2gGSyMQ6r3lLpbpXtZYG7s+fFYvw5nZGmSW54Ayt4="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Smoothbrain"; + name = "ServerCharacters"; + version = "1.4.16"; + hash = "sha256-aSB+G4nK3gf0yvMYWbICMFe3A0aCSr7nBH45G9ZdE9g="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "Smoothbrain"; + name = "SmoothSave"; + version = "1.0.5"; + hash = "sha256-v5Zn+0O0au8VDzO+302oCE7Z9s87I3nq+eK2WbVVyFo="; + }) + (pkgs.fetchValheimThunderstoreMod { + owner = "CW_Jesse"; + name = "BetterNetworking_Valheim"; + version = "2.3.2"; + hash = "sha256-krgZ4B+MbIG/3CQUMkVIB/xrvvW1TbxB0cp1KwCTBN4="; + }) + + ]; + }; + }; +} diff --git a/utils.nix b/utils.nix index 6691998..d81775d 100644 --- a/utils.nix +++ b/utils.nix @@ -8,7 +8,6 @@ ./modules/nixos inputs.home-manager.nixosModules.default inputs.stylix.nixosModules.stylix - inputs.valheim-server.nixosModules.default ]; }; } From b11fb1e8c329b430aeeacb37e28f311fb9fd15bd Mon Sep 17 00:00:00 2001 From: muon Date: Sat, 24 May 2025 09:19:56 +0000 Subject: [PATCH 3/9] Add nvfetcher --- _sources/generated.json | 212 +++++++++++++++++++++++++++++++ _sources/generated.nix | 124 ++++++++++++++++++ flake.nix | 6 +- modules/nixos/unfree/valheim.nix | 98 +------------- nvfetcher.toml | 75 +++++++++++ shell.nix | 1 + utils.nix | 4 +- 7 files changed, 423 insertions(+), 97 deletions(-) create mode 100644 _sources/generated.json create mode 100644 _sources/generated.nix create mode 100644 nvfetcher.toml diff --git a/_sources/generated.json b/_sources/generated.json new file mode 100644 index 0000000..2b9a49f --- /dev/null +++ b/_sources/generated.json @@ -0,0 +1,212 @@ +{ + "valheim.aaacrafting": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.aaacrafting", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-cObo71X0wOzW3pZwAy7/dh7IRghu7EMPw7vWuoPWPlk=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Azumatt/AAA_Crafting/1.6.6/" + }, + "version": "1.6.6" + }, + "valheim.autostore": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.autostore", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-ooghhDinwLTwEpTTQFj/brdb9Yj5aLGr+zYsjrsq9A0=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Azumatt/AzuAutoStore/3.0.8/" + }, + "version": "3.0.8" + }, + "valheim.betternetworking": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.betternetworking", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-krgZ4B+MbIG/3CQUMkVIB/xrvvW1TbxB0cp1KwCTBN4=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/CW_Jesse/BetterNetworking_Valheim/2.3.2/" + }, + "version": "2.3.2" + }, + "valheim.campsite": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.campsite", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-r3HTjfNy7ehr6bsjddr6mTA7T8VVXRhDfulIodjc0jc=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/OdinPlus/OdinCampsite/1.5.8/" + }, + "version": "1.5.8" + }, + "valheim.cartography": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.cartography", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-u20BTiyF4e6QJ6OUK5migjdEpyzIGRDxLPJ3NdZNhvA=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Advize/CartographySkill/3.0.1/" + }, + "version": "3.0.1" + }, + "valheim.craftyboxes": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.craftyboxes", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-8bvHmONHuc9K0cgT42+W4oxQ6MusAv8v0IIVMerdYSA=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Azumatt/AzuCraftyBoxes/1.8.4/" + }, + "version": "1.8.4" + }, + "valheim.extendedinv": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.extendedinv", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-Xd7KdUm3c14iQBST31DAqs+bQF9hwYhUxE66o3lusrA=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Azumatt/AzuExtendedPlayerInventory/1.4.9/" + }, + "version": "1.4.9" + }, + "valheim.jotunn": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.jotunn", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-Tso4/Sf4Evt5kpBrVqZrjE9Qs2MSZV04WB1w+uX+TX8=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/ValheimModding/Jotunn/2.25.0/" + }, + "version": "2.25.0" + }, + "valheim.multiuserchest": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.multiuserchest", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-PhXW6vBtEMnhE93RAALEucPU9q3VpdMrooFawWYXl2A=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/MSchmoecker/MultiUserChest/0.6.1/" + }, + "version": "0.6.1" + }, + "valheim.quickteleport": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.quickteleport", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-YSAVthV994do/atQA+wGfillXeSYFlLJK6VyMcQNVKE=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/OdinPlus/QuickTeleport/1.1.0/" + }, + "version": "1.1.0" + }, + "valheim.reclaim": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.reclaim", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-2cWdmspwid2h1ekfDFAngN25402pQnxZQhm4rX6BNhw=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Azumatt/Recycle_N_Reclaim/1.3.6/" + }, + "version": "1.3.6" + }, + "valheim.seedbed": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.seedbed", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-wm2gGSyMQ6r3lLpbpXtZYG7s+fFYvw5nZGmSW54Ayt4=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/blacks7ar/SeedBed/1.2.7/" + }, + "version": "1.2.7" + }, + "valheim.servercharacters": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.servercharacters", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-aSB+G4nK3gf0yvMYWbICMFe3A0aCSr7nBH45G9ZdE9g=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Smoothbrain/ServerCharacters/1.4.16/" + }, + "version": "1.4.16" + }, + "valheim.smoothsave": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.smoothsave", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-v5Zn+0O0au8VDzO+302oCE7Z9s87I3nq+eK2WbVVyFo=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/Smoothbrain/SmoothSave/1.0.5/" + }, + "version": "1.0.5" + }, + "valheim.swim": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "valheim.swim", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-QCEYnx0I6onWEAJy851wS0WdC35L18DyJL1wAAwHFaU=", + "type": "tarball", + "url": "https://thunderstore.io/package/download/blacks7ar/VikingsDoSwim/1.3.8/" + }, + "version": "1.3.8" + } +} \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix new file mode 100644 index 0000000..202c630 --- /dev/null +++ b/_sources/generated.nix @@ -0,0 +1,124 @@ +# This file was generated by nvfetcher, please do not modify it manually. +{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }: +{ + "valheim.aaacrafting" = { + pname = "valheim.aaacrafting"; + version = "1.6.6"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Azumatt/AAA_Crafting/1.6.6/"; + sha256 = "sha256-cObo71X0wOzW3pZwAy7/dh7IRghu7EMPw7vWuoPWPlk="; + }; + }; + "valheim.autostore" = { + pname = "valheim.autostore"; + version = "3.0.8"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Azumatt/AzuAutoStore/3.0.8/"; + sha256 = "sha256-ooghhDinwLTwEpTTQFj/brdb9Yj5aLGr+zYsjrsq9A0="; + }; + }; + "valheim.betternetworking" = { + pname = "valheim.betternetworking"; + version = "2.3.2"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/CW_Jesse/BetterNetworking_Valheim/2.3.2/"; + sha256 = "sha256-krgZ4B+MbIG/3CQUMkVIB/xrvvW1TbxB0cp1KwCTBN4="; + }; + }; + "valheim.campsite" = { + pname = "valheim.campsite"; + version = "1.5.8"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/OdinPlus/OdinCampsite/1.5.8/"; + sha256 = "sha256-r3HTjfNy7ehr6bsjddr6mTA7T8VVXRhDfulIodjc0jc="; + }; + }; + "valheim.cartography" = { + pname = "valheim.cartography"; + version = "3.0.1"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Advize/CartographySkill/3.0.1/"; + sha256 = "sha256-u20BTiyF4e6QJ6OUK5migjdEpyzIGRDxLPJ3NdZNhvA="; + }; + }; + "valheim.craftyboxes" = { + pname = "valheim.craftyboxes"; + version = "1.8.4"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Azumatt/AzuCraftyBoxes/1.8.4/"; + sha256 = "sha256-8bvHmONHuc9K0cgT42+W4oxQ6MusAv8v0IIVMerdYSA="; + }; + }; + "valheim.extendedinv" = { + pname = "valheim.extendedinv"; + version = "1.4.9"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Azumatt/AzuExtendedPlayerInventory/1.4.9/"; + sha256 = "sha256-Xd7KdUm3c14iQBST31DAqs+bQF9hwYhUxE66o3lusrA="; + }; + }; + "valheim.jotunn" = { + pname = "valheim.jotunn"; + version = "2.25.0"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/ValheimModding/Jotunn/2.25.0/"; + sha256 = "sha256-Tso4/Sf4Evt5kpBrVqZrjE9Qs2MSZV04WB1w+uX+TX8="; + }; + }; + "valheim.multiuserchest" = { + pname = "valheim.multiuserchest"; + version = "0.6.1"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/MSchmoecker/MultiUserChest/0.6.1/"; + sha256 = "sha256-PhXW6vBtEMnhE93RAALEucPU9q3VpdMrooFawWYXl2A="; + }; + }; + "valheim.quickteleport" = { + pname = "valheim.quickteleport"; + version = "1.1.0"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/OdinPlus/QuickTeleport/1.1.0/"; + sha256 = "sha256-YSAVthV994do/atQA+wGfillXeSYFlLJK6VyMcQNVKE="; + }; + }; + "valheim.reclaim" = { + pname = "valheim.reclaim"; + version = "1.3.6"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Azumatt/Recycle_N_Reclaim/1.3.6/"; + sha256 = "sha256-2cWdmspwid2h1ekfDFAngN25402pQnxZQhm4rX6BNhw="; + }; + }; + "valheim.seedbed" = { + pname = "valheim.seedbed"; + version = "1.2.7"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/blacks7ar/SeedBed/1.2.7/"; + sha256 = "sha256-wm2gGSyMQ6r3lLpbpXtZYG7s+fFYvw5nZGmSW54Ayt4="; + }; + }; + "valheim.servercharacters" = { + pname = "valheim.servercharacters"; + version = "1.4.16"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Smoothbrain/ServerCharacters/1.4.16/"; + sha256 = "sha256-aSB+G4nK3gf0yvMYWbICMFe3A0aCSr7nBH45G9ZdE9g="; + }; + }; + "valheim.smoothsave" = { + pname = "valheim.smoothsave"; + version = "1.0.5"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/Smoothbrain/SmoothSave/1.0.5/"; + sha256 = "sha256-v5Zn+0O0au8VDzO+302oCE7Z9s87I3nq+eK2WbVVyFo="; + }; + }; + "valheim.swim" = { + pname = "valheim.swim"; + version = "1.3.8"; + src = fetchTarball { + url = "https://thunderstore.io/package/download/blacks7ar/VikingsDoSwim/1.3.8/"; + sha256 = "sha256-QCEYnx0I6onWEAJy851wS0WdC35L18DyJL1wAAwHFaU="; + }; + }; +} diff --git a/flake.nix b/flake.nix index f828c54..f4a1be4 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,11 @@ pkgs = import inputs.nixpkgs { inherit system; }; - utils = import ./utils.nix { inherit inputs system; }; + sources = import ./_sources/generated.nix { + inherit (pkgs) fetchurl fetchgit fetchFromGitHub dockerTools; + }; + + utils = import ./utils.nix { inherit inputs system sources; }; in { nixosConfigurations = { # desktop diff --git a/modules/nixos/unfree/valheim.nix b/modules/nixos/unfree/valheim.nix index 8f512e3..f78c1fe 100644 --- a/modules/nixos/unfree/valheim.nix +++ b/modules/nixos/unfree/valheim.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, config, inputs, ... }: { +{ pkgs, lib, config, inputs, sources, ... }: { options.mods.unfree.valheim = { enable = lib.mkEnableOption { default = false; @@ -19,99 +19,9 @@ worldName = "Smorld"; openFirewall = true; password = "notbeempty"; - bepinexMods = [ - (pkgs.fetchValheimThunderstoreMod { - owner = "ValheimModding"; - name = "Jotunn"; - version = "2.25.0"; - hash = "sha256-Tso4/Sf4Evt5kpBrVqZrjE9Qs2MSZV04WB1w+uX+TX8="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "AzuCraftyBoxes"; - version = "1.8.4"; - hash = "sha256-8bvHmONHuc9K0cgT42+W4oxQ6MusAv8v0IIVMerdYSA="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "AzuAutoStore"; - version = "3.0.8"; - hash = "sha256-ooghhDinwLTwEpTTQFj/brdb9Yj5aLGr+zYsjrsq9A0="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "AzuExtendedPlayerInventory"; - version = "1.4.9"; - hash = "sha256-Xd7KdUm3c14iQBST31DAqs+bQF9hwYhUxE66o3lusrA="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "Recycle_N_Reclaim"; - version = "1.3.6"; - hash = "sha256-2cWdmspwid2h1ekfDFAngN25402pQnxZQhm4rX6BNhw="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Azumatt"; - name = "AAA_Crafting"; - version = "1.6.6"; - hash = "sha256-cObo71X0wOzW3pZwAy7/dh7IRghu7EMPw7vWuoPWPlk="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "OdinPlus"; - name = "OdinCampsite"; - version = "1.5.8"; - hash = "sha256-r3HTjfNy7ehr6bsjddr6mTA7T8VVXRhDfulIodjc0jc="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "OdinPlus"; - name = "QuickTeleport"; - version = "1.1.0"; - hash = "sha256-YSAVthV994do/atQA+wGfillXeSYFlLJK6VyMcQNVKE="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "MSchmoecker"; - name = "MultiUserChest"; - version = "0.6.1"; - hash = "sha256-PhXW6vBtEMnhE93RAALEucPU9q3VpdMrooFawWYXl2A="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Advize"; - name = "CartographySkill"; - version = "3.0.1"; - hash = "sha256-u20BTiyF4e6QJ6OUK5migjdEpyzIGRDxLPJ3NdZNhvA="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "blacks7ar"; - name = "VikingsDoSwim"; - version = "1.3.8"; - hash = "sha256-QCEYnx0I6onWEAJy851wS0WdC35L18DyJL1wAAwHFaU="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "blacks7ar"; - name = "SeedBed"; - version = "1.2.7"; - hash = "sha256-wm2gGSyMQ6r3lLpbpXtZYG7s+fFYvw5nZGmSW54Ayt4="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Smoothbrain"; - name = "ServerCharacters"; - version = "1.4.16"; - hash = "sha256-aSB+G4nK3gf0yvMYWbICMFe3A0aCSr7nBH45G9ZdE9g="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "Smoothbrain"; - name = "SmoothSave"; - version = "1.0.5"; - hash = "sha256-v5Zn+0O0au8VDzO+302oCE7Z9s87I3nq+eK2WbVVyFo="; - }) - (pkgs.fetchValheimThunderstoreMod { - owner = "CW_Jesse"; - name = "BetterNetworking_Valheim"; - version = "2.3.2"; - hash = "sha256-krgZ4B+MbIG/3CQUMkVIB/xrvvW1TbxB0cp1KwCTBN4="; - }) - - ]; + bepinexMods = lib.mapAttrsToList (name: value: value.src) + (lib.attrsets.filterAttrs (n: v: lib.strings.hasPrefix "valheim." n) + sources); }; }; } diff --git a/nvfetcher.toml b/nvfetcher.toml new file mode 100644 index 0000000..1c299bb --- /dev/null +++ b/nvfetcher.toml @@ -0,0 +1,75 @@ +["valheim.jotunn"] +src.webpage = "https://thunderstore.io/c/valheim/p/ValheimModding/Jotunn/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/ValheimModding/Jotunn/$ver/" + +["valheim.craftyboxes"] +src.webpage = "https://thunderstore.io/c/valheim/p/Azumatt/AzuCraftyBoxes/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Azumatt/AzuCraftyBoxes/$ver/" + +["valheim.autostore"] +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.extendedinv"] +src.webpage = "https://thunderstore.io/c/valheim/p/Azumatt/AzuExtendedPlayerInventory/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Azumatt/AzuExtendedPlayerInventory/$ver/" + +["valheim.reclaim"] +src.webpage = "https://thunderstore.io/c/valheim/p/Azumatt/Recycle_N_Reclaim/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Azumatt/Recycle_N_Reclaim/$ver/" + +["valheim.aaacrafting"] +src.webpage = "https://thunderstore.io/c/valheim/p/Azumatt/AAA_Crafting/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Azumatt/AAA_Crafting/$ver/" + +["valheim.campsite"] +src.webpage = "https://thunderstore.io/c/valheim/p/OdinPlus/OdinCampsite/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/OdinPlus/OdinCampsite/$ver/" + +["valheim.quickteleport"] +src.webpage = "https://thunderstore.io/c/valheim/p/OdinPlus/QuickTeleport/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/OdinPlus/QuickTeleport/$ver/" + +["valheim.multiuserchest"] +src.webpage = "https://thunderstore.io/c/valheim/p/MSchmoecker/MultiUserChest/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/MSchmoecker/MultiUserChest/$ver/" + +["valheim.cartography"] +src.webpage = "https://thunderstore.io/c/valheim/p/Advize/CartographySkill/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Advize/CartographySkill/$ver/" + +["valheim.swim"] +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.seedbed"] +src.webpage = "https://thunderstore.io/c/valheim/p/blacks7ar/SeedBed/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/blacks7ar/SeedBed/$ver/" + +["valheim.servercharacters"] +src.webpage = "https://thunderstore.io/c/valheim/p/Smoothbrain/ServerCharacters/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/Smoothbrain/ServerCharacters/$ver/" + +["valheim.smoothsave"] +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.betternetworking"] +src.webpage = "https://thunderstore.io/c/valheim/p/CW_Jesse/BetterNetworking_Valheim/" +src.regex = "v(\\d+\\.\\d+\\.\\d+)" +fetch.tarball = "https://thunderstore.io/package/download/CW_Jesse/BetterNetworking_Valheim/$ver/" + diff --git a/shell.nix b/shell.nix index b4d1f3e..5d84124 100644 --- a/shell.nix +++ b/shell.nix @@ -8,6 +8,7 @@ sops age + nvfetcher ]; }; } diff --git a/utils.nix b/utils.nix index d81775d..672e982 100644 --- a/utils.nix +++ b/utils.nix @@ -1,7 +1,7 @@ -{ inputs, system, ... }: { +{ inputs, system, sources, ... }: { mkHost = host: inputs.nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs system; }; + specialArgs = { inherit inputs system sources; }; modules = [ host From d6349ee91c17c96dab5e4a4f9cadd27798e2c14c Mon Sep 17 00:00:00 2001 From: muon Date: Sat, 24 May 2025 09:30:06 +0000 Subject: [PATCH 4/9] Move hashes to nvfetcher --- _sources/generated.json | 15 +++++++++++++ _sources/generated.nix | 8 +++++++ modules/home/desktop/social.nix | 9 ++------ modules/home/terminal/development.nix | 31 +++------------------------ nvfetcher.toml | 4 ++++ 5 files changed, 32 insertions(+), 35 deletions(-) diff --git a/_sources/generated.json b/_sources/generated.json index 2b9a49f..15e0eca 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -208,5 +208,20 @@ "url": "https://thunderstore.io/package/download/blacks7ar/VikingsDoSwim/1.3.8/" }, "version": "1.3.8" + }, + "vesktop.micfix": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "vesktop.micfix", + "passthru": null, + "pinned": false, + "src": { + "name": null, + "sha256": "sha256-eNOKW43LQdJp2GFHqe3RxAhMwkNulrotIOMByosen84=", + "type": "url", + "url": "https://codeberg.org/muon/gists/raw/branch/main/micfix.patch" + }, + "version": "1.0.1" } } \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix index 202c630..90419fd 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -121,4 +121,12 @@ sha256 = "sha256-QCEYnx0I6onWEAJy851wS0WdC35L18DyJL1wAAwHFaU="; }; }; + "vesktop.micfix" = { + pname = "vesktop.micfix"; + version = "1.0.1"; + src = fetchurl { + url = "https://codeberg.org/muon/gists/raw/branch/main/micfix.patch"; + sha256 = "sha256-eNOKW43LQdJp2GFHqe3RxAhMwkNulrotIOMByosen84="; + }; + }; } diff --git a/modules/home/desktop/social.nix b/modules/home/desktop/social.nix index 3f84ec0..170857b 100644 --- a/modules/home/desktop/social.nix +++ b/modules/home/desktop/social.nix @@ -1,12 +1,7 @@ -{ pkgs, lib, config, ... }: +{ pkgs, lib, config, sources, ... }: let vesktop-nogain = (pkgs.vesktop.overrideAttrs (previousAttrs: { - patches = previousAttrs.patches ++ [ - (builtins.fetchurl { - url = "https://codeberg.org/muon/gists/raw/branch/main/micfix.patch"; - sha256 = "1klz3s5wl0g340nvm5kf8g14q264s7nsjiv1v1lx4hfbimdqmlvq"; - }) - ]; + patches = previousAttrs.patches ++ [ sources."vesktop.micfix".src ]; })); in { options.mods.social.enable = diff --git a/modules/home/terminal/development.nix b/modules/home/terminal/development.nix index 425f790..be3c0bb 100644 --- a/modules/home/terminal/development.nix +++ b/modules/home/terminal/development.nix @@ -1,29 +1,4 @@ -{ pkgs, lib, config, ... }: -let - wgsl_analyzer = with pkgs; - stdenv.mkDerivation rec { - pname = "wgsl_analyzer"; - version = "0.8.1"; - - src = fetchurl { - url = - "https://github.com/wgsl-analyzer/wgsl-analyzer/releases/download/v${version}/${pname}-linux-x64"; - hash = "sha256-WRc9fHUw9/KHD5BzUX3nd+0sRkc7i8axsXhHUZFOUeY="; - }; - - nativeBuildInputs = [ autoPatchelfHook ]; - - buildInputs = [ openssl zlib ]; - - sourceRoot = "."; - phases = [ "installPhase" "patchPhase" ]; - installPhase = '' - mkdir -p $out/bin - cp $src $out/bin/${pname} - chmod +x $out/bin/${pname} - ''; - }; -in { +{ pkgs, lib, config, ... }: { options.mods.terminal.development.enable = lib.mkEnableOption "enables cli editor"; @@ -38,7 +13,7 @@ in { # Shaders glsl_analyzer - # wgsl_analyzer + wgsl-analyzer # Python black @@ -79,7 +54,7 @@ in { languages.language-server = { glsl.command = "${pkgs.glsl_analyzer}/bin/glsl_analyzer"; - wgsl.command = "${wgsl_analyzer}/bin/wgsl_analyzer"; + wgsl.command = "${pkgs.wgsl-analyzer}/bin/wgsl_analyzer"; }; languages.language = [ diff --git a/nvfetcher.toml b/nvfetcher.toml index 1c299bb..dc06315 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -1,3 +1,7 @@ +["vesktop.micfix"] +src.manual = "1.0.1" +fetch.url = "https://codeberg.org/muon/gists/raw/branch/main/micfix.patch" + ["valheim.jotunn"] src.webpage = "https://thunderstore.io/c/valheim/p/ValheimModding/Jotunn/" src.regex = "v(\\d+\\.\\d+\\.\\d+)" From 18bd8fce19958e1ca792d3c8f86e396bf58e1ef6 Mon Sep 17 00:00:00 2001 From: muon Date: Sat, 24 May 2025 09:33:49 +0000 Subject: [PATCH 5/9] Update nix Add r2modman --- flake.lock | 80 ++++++++++++++---------------------- hosts/muon/configuration.nix | 6 ++- 2 files changed, 34 insertions(+), 52 deletions(-) diff --git a/flake.lock b/flake.lock index 9ca1e72..4bc5125 100644 --- a/flake.lock +++ b/flake.lock @@ -133,7 +133,6 @@ "inputs": { "nixpkgs-lib": [ "stylix", - "nur", "nixpkgs" ] }, @@ -169,27 +168,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": [ - "stylix", - "systems" - ] - }, - "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" - } - }, "fromYaml": { "flake": false, "locked": { @@ -257,16 +235,16 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1732369855, - "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", + "lastModified": 1744584021, + "narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "dadd58f630eeea41d645ee225a63f719390829dc", + "rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae", "type": "github" }, "original": { "owner": "GNOME", - "ref": "47.2", + "ref": "48.1", "repo": "gnome-shell", "type": "github" } @@ -278,11 +256,11 @@ ] }, "locked": { - "lastModified": 1747279714, - "narHash": "sha256-UdxlE8yyrKiGq3bgGyJ78AdFwh+fuRAruKtyFY5Zq5I=", + "lastModified": 1747793476, + "narHash": "sha256-2qAOSixSrbb9l6MI+SI4zGineOzDcc2dgOOFK9Dx+IY=", "owner": "nix-community", "repo": "home-manager", - "rev": "954615c510c9faa3ee7fb6607ff72e55905e69f2", + "rev": "2468b2d35512d093aeb04972a1d8c20a0735793f", "type": "github" }, "original": { @@ -299,11 +277,11 @@ ] }, "locked": { - "lastModified": 1747155932, - "narHash": "sha256-NnPzzXEqfYjfrimLzK0JOBItfdEJdP/i6SNTuunCGgw=", + "lastModified": 1747763032, + "narHash": "sha256-9j3oCbemeH7bTVXJ3pDWxOptbxDx2SdK1jY2AHpjQiw=", "owner": "nix-community", "repo": "home-manager", - "rev": "8d832ddfda9facf538f3dda9b6985fb0234f151c", + "rev": "29dda415f5b2178278283856c6f9f7b48a2a4353", "type": "github" }, "original": { @@ -407,11 +385,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1747179050, - "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { @@ -423,11 +401,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1745930157, - "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", + "lastModified": 1747542820, + "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", + "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", "type": "github" }, "original": { @@ -439,7 +417,10 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts", + "flake-parts": [ + "stylix", + "flake-parts" + ], "nixpkgs": [ "stylix", "nixpkgs" @@ -477,11 +458,11 @@ ] }, "locked": { - "lastModified": 1746485181, - "narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=", + "lastModified": 1747603214, + "narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=", "owner": "Mic92", "repo": "sops-nix", - "rev": "e93ee1d900ad264d65e9701a5c6f895683433386", + "rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd", "type": "github" }, "original": { @@ -498,7 +479,7 @@ "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_2", + "flake-parts": "flake-parts", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", @@ -512,11 +493,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1747277033, - "narHash": "sha256-CXlOnolot/OYiDoG391q2dQVmdtuznpDRlsY+m55oHo=", + "lastModified": 1747813884, + "narHash": "sha256-XKkGD2a3GAFNjs1z58K4wb7as2gNqFzc11uvgvWwYQs=", "owner": "danth", "repo": "stylix", - "rev": "b460904a6fc6273345d5e2525dc89ec033d68be9", + "rev": "4830942fa2a475c2be5d45ca1267fa77036bf9a6", "type": "github" }, "original": { @@ -575,17 +556,16 @@ "tinted-kitty": { "flake": false, "locked": { - "lastModified": 1716423189, - "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", "owner": "tinted-theming", "repo": "tinted-kitty", - "rev": "eb39e141db14baef052893285df9f266df041ff8", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "tinted-kitty", - "rev": "eb39e141db14baef052893285df9f266df041ff8", "type": "github" } }, diff --git a/hosts/muon/configuration.nix b/hosts/muon/configuration.nix index 41fc7a4..ac7dc22 100644 --- a/hosts/muon/configuration.nix +++ b/hosts/muon/configuration.nix @@ -5,8 +5,10 @@ in { # Hardware imports = [ ./hardware-configuration.nix ]; - environment.systemPackages = with inputs.nix-alien.packages.${system}; - [ nix-alien ]; + environment.systemPackages = with inputs.nix-alien.packages.${system}; [ + nix-alien + pkgs.r2modman + ]; # System mods.user.name = "muon"; From e4451da88d32b410d8c963f8f1a0d3fac03a9e40 Mon Sep 17 00:00:00 2001 From: muon Date: Sat, 24 May 2025 09:49:31 +0000 Subject: [PATCH 6/9] Update nix --- flake.lock | 18 +++++++++--------- flake.nix | 2 +- hosts/muho/home.nix | 2 +- hosts/muon/configuration.nix | 2 +- modules/home/terminal/development.nix | 2 +- modules/home/terminal/shell.nix | 22 ++++++++-------------- modules/nixos/core/home.nix | 17 +++++++---------- 7 files changed, 28 insertions(+), 37 deletions(-) diff --git a/flake.lock b/flake.lock index 6250aa7..47d5d36 100644 --- a/flake.lock +++ b/flake.lock @@ -256,11 +256,11 @@ ] }, "locked": { - "lastModified": 1747793476, - "narHash": "sha256-2qAOSixSrbb9l6MI+SI4zGineOzDcc2dgOOFK9Dx+IY=", + "lastModified": 1747978958, + "narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "2468b2d35512d093aeb04972a1d8c20a0735793f", + "rev": "7419250703fd5eb50e99bdfb07a86671939103ea", "type": "github" }, "original": { @@ -297,11 +297,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1747293822, - "narHash": "sha256-1R3Ro+RQCUUnIFZDObP9/2QBLk3xvgbXU67Qii+YZ8s=", + "lastModified": 1747908601, + "narHash": "sha256-cSzec5IT7Imx9g+Rhpt4GxrLiNF++V+guzYCnWUjhAI=", "owner": "thiagokokada", "repo": "nix-alien", - "rev": "ea7eb3a76520fa8d92879afb819756ffc0bc629e", + "rev": "798541edff98cfa895941abe35f3e056f319a193", "type": "github" }, "original": { @@ -515,11 +515,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1747813884, - "narHash": "sha256-XKkGD2a3GAFNjs1z58K4wb7as2gNqFzc11uvgvWwYQs=", + "lastModified": 1748028561, + "narHash": "sha256-IgtJU6n9vR3nBUdcXrc7K9E+Y/G/4P6hFifGRr1tXMU=", "owner": "danth", "repo": "stylix", - "rev": "4830942fa2a475c2be5d45ca1267fa77036bf9a6", + "rev": "34b5930894d8315401d93bd8a9a6635e1cd28eff", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f4a1be4..4615bfa 100644 --- a/flake.nix +++ b/flake.nix @@ -51,7 +51,7 @@ meta = { nixpkgs = import inputs.nixpkgs { inherit system; }; - specialArgs = { inherit nixpkgs inputs system; }; + specialArgs = { inherit nixpkgs inputs system sources; }; }; # Remote host name diff --git a/hosts/muho/home.nix b/hosts/muho/home.nix index 497772b..28de781 100644 --- a/hosts/muho/home.nix +++ b/hosts/muho/home.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, osConfig, ... }: +{ pkgs, lib, osConfig, sources, ... }: let cfg = osConfig.mods; in { # Modules diff --git a/hosts/muon/configuration.nix b/hosts/muon/configuration.nix index ac7dc22..68fd567 100644 --- a/hosts/muon/configuration.nix +++ b/hosts/muon/configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, system, ... }: +{ config, lib, pkgs, inputs, system, sources, ... }: let cfg = config.mods; in { diff --git a/modules/home/terminal/development.nix b/modules/home/terminal/development.nix index be3c0bb..ba15b4b 100644 --- a/modules/home/terminal/development.nix +++ b/modules/home/terminal/development.nix @@ -54,7 +54,7 @@ languages.language-server = { glsl.command = "${pkgs.glsl_analyzer}/bin/glsl_analyzer"; - wgsl.command = "${pkgs.wgsl-analyzer}/bin/wgsl_analyzer"; + wgsl.command = "${pkgs.wgsl-analyzer}/bin/wgsl-analyzer"; }; languages.language = [ diff --git a/modules/home/terminal/shell.nix b/modules/home/terminal/shell.nix index fab820b..c279d04 100644 --- a/modules/home/terminal/shell.nix +++ b/modules/home/terminal/shell.nix @@ -2,14 +2,10 @@ let cfg = config.mods.terminal; - aliases = { - la = "ls -lah"; - }; + aliases = { la = "ls -lah"; }; in { - options.mods.terminal = { - zsh.enable = lib.mkEnableOption "enables zsh"; - }; + options.mods.terminal = { zsh.enable = lib.mkEnableOption "enables zsh"; }; config = { programs.starship.enable = true; @@ -29,20 +25,18 @@ in { path = "${config.xdg.dataHome}/zsh/history"; }; - initExtra = '' + initContent = '' autoload -U compinit setopt no_auto_remove_slash ''; shellAliases = aliases; - plugins = with pkgs; [ - { - name = "zsh-vi-mode"; - src = zsh-vi-mode; - file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh"; - } - ]; + plugins = with pkgs; [{ + name = "zsh-vi-mode"; + src = zsh-vi-mode; + file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh"; + }]; }; }; } diff --git a/modules/nixos/core/home.nix b/modules/nixos/core/home.nix index e2e1be9..8829fd5 100644 --- a/modules/nixos/core/home.nix +++ b/modules/nixos/core/home.nix @@ -1,19 +1,16 @@ -{ pkgs, lib, config, inputs, system, ... }: let - cfg = config.mods; +{ pkgs, lib, config, inputs, system, sources, ... }: +let cfg = config.mods; in { - options.mods.home.file = lib.mkOption { - description = "home-manager configuration file"; - }; + options.mods.home.file = + lib.mkOption { description = "home-manager configuration file"; }; config = { home-manager = { - extraSpecialArgs = { inherit system pkgs inputs; }; + extraSpecialArgs = { inherit system pkgs inputs sources; }; users."${cfg.user.name}" = { - imports = [ - cfg.home.file - inputs.self.outputs.homeManagerModules.default - ]; + imports = + [ cfg.home.file inputs.self.outputs.homeManagerModules.default ]; }; backupFileExtension = "bak"; }; From 7f5566f3096ef38e273f60344336a8817f7dcf2c Mon Sep 17 00:00:00 2001 From: muon Date: Sat, 24 May 2025 09:56:56 +0000 Subject: [PATCH 7/9] 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 8/9] 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 9/9] 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 ]; }