add wow-addon-manager

This commit is contained in:
2023-09-30 11:53:05 +02:00
parent b6d07d4142
commit 4e3bf001b4
8 changed files with 462 additions and 12 deletions

View File

@@ -14,6 +14,8 @@
./utils/bento.nix
./modules/sway/sway.nix
./modules/wow-addon-manager.nix
./modules/wow.nix
./hardware-configuration.nix
];

View File

@@ -1,16 +1,120 @@
{ buildGoModule, fetchFromGitHub, ... }:
{ config, lib, pkgs, ... }:
let
wow-addon-manager = buildGoModule rec {
src = fetchFromGitHub {
owner = "Gonzih";
repo = "wow-addon-manager";
rev = "b72bcf1fc62ce6b51f8d53997e92f0351f87ebb4";
sha256 = "0rs9bxxrw4wscf4a8yl776a8g880m5gcm75q06yx2cn3lw2b7v22";
};
};
cfg = config.programs.wow-addon-manager;
in {
environment.systemPackages = [
wow-addon-manager
];
options.programs.wow-addon-manager = {
enable = mkOption {
default = false;
description = lib.mdDoc ''
Whether to enable wow-addon-manager.
'';
type = types.bool;
};
startAt = mkOption {
type = with types; either str (listOf str);
default = "*:0/15";
example = "*:0/15";
description = lib.mdDoc ''
The time(s) to run wow-addon-manager updates.
Specified in systemd's time format; see
{manpage}`systemd.time(7)`.
'';
};
user = mkOption {
type = types.str;
default = "dominik";
description = lib.mdDoc "User to run wow-addon-manager.";
};
addonList = mkOption {
type = with types; nullOr lines;;
default = null;
description = lib.mdDoc ''
WoW Retail addons to load
'';
example = literalExpression ''
https://wowinterface.com/downloads/info15636-tullaRange.html
https://addon.theunderminejournal.com/TheUndermineJournal.zip
https://github.com/TekNoLogic/VendorBait.git
https://github.com/ColbyWanShinobi/gsReloadUI.git
https://github.com/ColbyWanShinobi/gsNoGryphons.git
https://github.com/ColbyWanShinobi/gsQuestSounds.git
http://wowinterface.com/downloads/info12995-NPCScan.html
https://wowinterface.com/downloads/info5108-Clique.html
https://wowinterface.com/downloads/info20804-Grail.html
https://wowinterface.com/downloads/info7032-TomTom.html
https://wowinterface.com/downloads/info24910-WeakAuras2.html
https://wowinterface.com/downloads/info7296-Pawn.html
https://wowinterface.com/downloads/info20805-Wholly.html
https://wowinterface.com/downloads/info24802-ChampionCommander.html
https://www.wowinterface.com/downloads/info25313-Dejunk.html
https://www.wowinterface.com/downloads/info10089-ItemID.html
https://www.wowinterface.com/downloads/info24508-ImprovedNameplates.html
'';
};
classicAddonList = mkOption {
type = with types; nullOr lines;;
default = null;
description = lib.mdDoc ''
WoW Retail addons to load
'';
example = literalExpression ''
https://github.com/RagedUnicorn/wow-vanilla-gearmenu.git
https://wowinterface.com/downloads/info15636-tullaRange.html
https://www.curseforge.com/wow/addons/bagsync/download
https://www.curseforge.com/wow/addons/quest_completist/download
http://www.curseforge.com/wow/addons/mmz/download
http://www.curseforge.com/wow/addons/clique/download
http://www.curseforge.com/wow/addons/grail/download
http://www.curseforge.com/wow/addons/tomtom/download
https://github.com/TekNoLogic/VendorBait.git
https://github.com/ColbyWanShinobi/gsReloadUI.git
https://github.com/ColbyWanShinobi/gsNoGryphons.git
https://github.com/ColbyWanShinobi/gsQuestSounds.git
https://www.curseforge.com/wow/addons/tradeskill-master/download
https://www.curseforge.com/wow/addons/monkey-speed/download
https://www.curseforge.com/wow/addons/cursortrail/download
http://wowinterface.com/downloads/info12995-NPCScan.html
https://www.curseforge.com/wow/addons/advancedinterfaceoptions/download
https://www.curseforge.com/wow/addons/weaponswingtimer/download
https://www.curseforge.com/wow/addons/azeroth-auto-pilot-classic/download
https://www.curseforge.com/wow/addons/details/download
https://www.curseforge.com/wow/addons/big-wigs/download
https://www.curseforge.com/wow/addons/bartender4/download
https://www.curseforge.com/wow/addons/little-wigs/download
https://www.curseforge.com/wow/addons/omni-cc/download
https://www.curseforge.com/wow/addons/questie/download
https://www.curseforge.com/wow/addons/atlaslootclassic/download
https://www.curseforge.com/wow/addons/mapster/download
https://www.curseforge.com/wow/addons/vendor-price/download
https://www.curseforge.com/wow/addons/leatrix-plus-classic/download
https://www.curseforge.com/wow/addons/inventorian/download
https://www.curseforge.com/wow/addons/bagnon/download
https://www.wowinterface.com/downloads/info25006-ClassicAuraDurations.html
https://www.wowinterface.com/downloads/info24958-AuctionatorClassicquickfix.html
https://www.wowinterface.com/downloads/info25036-DruidBarClassic.html
https://www.curseforge.com/wow/addons/outfitter/download
https://wowinterface.com/downloads/info24944-WeakAuras2Classic.html
'';
};
};
config = {
systemd.services."wow-addon-manager" = {
startAt = cfg.startAt;
script = ''
set -eu
${pkgs.wow-addon-manager}/bin/wow-addon-manager
${pkgs.wow-addon-manager}/bin/wow-addon-manager classic
'';
serviceConfig = {
Type = "oneshot";
User = cfg.user;
};
};
environment.etc = {
"wow-addon-manager/addon.list".text = cfg.addonList;
"wow-addon-manager/addon.classic.list".text = cfg.classicAddonList;
};
};
}

View File

@@ -0,0 +1,22 @@
{ ... }:
{
programs.wow-addon-manager = {
enable = true;
user = "dominik";
addonList = ''
https://www.curseforge.com/wow/addons/console-port/download
https://www.curseforge.com/wow/addons/immersion/download
https://www.curseforge.com/wow/addons/dynamiccam/download
https://www.curseforge.com/wow/addons/bagnon/download
https://www.curseforge.com/wow/addons/guidelime/download
'';
classicAddonList = ''
https://www.curseforge.com/wow/addons/console-port/download
https://www.curseforge.com/wow/addons/immersion/download
https://www.curseforge.com/wow/addons/dynamiccam/download
https://www.curseforge.com/wow/addons/bagnon/download
https://www.curseforge.com/wow/addons/guidelime/download
https://www.curseforge.com/wow/addons/guidelime_sage/download
'';
}
}