push
This commit is contained in:
1 parent
8d55b87546
commit
c86ee98def
14 files changed
+472
-111
No files matched your search
@@ -29,11 +29,6 @@
|
||||
|
||||
system = {
|
||||
stateVersion = "26.05";
|
||||
|
||||
autoUpgrade = {
|
||||
enable = true;
|
||||
allowReboot = false;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
|
||||
@@ -44,9 +44,12 @@
|
||||
services.invidious
|
||||
services.mailserver
|
||||
# services.matrix
|
||||
services.redlib
|
||||
services.bugtv
|
||||
services.vscode-server
|
||||
services.gitea
|
||||
services.gitea-runner
|
||||
services.attic
|
||||
# services.omnisearch
|
||||
services.slskd
|
||||
services.mpd
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
# Private Nix binary cache. Caches are created private; pulling needs a token (netrc).
|
||||
den.aspects.services.attic = let port = 8090; in {
|
||||
tunnel = { subdomain = "cache"; inherit port; };
|
||||
|
||||
nixos = { config, host, ... }: {
|
||||
services.atticd = {
|
||||
enable = true;
|
||||
# ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64=...
|
||||
environmentFile = "${config.users.users.${host.owner}.home}/.config/attic/env";
|
||||
settings = {
|
||||
listen = "127.0.0.1:${toString port}";
|
||||
# No api-endpoint: CI uploads stay on localhost (Cloudflare caps bodies at 100MB).
|
||||
substituter-endpoint = "https://cache.${host.domain}/";
|
||||
# Big NARs (darling rootfs) dedupe better in chunks.
|
||||
chunking = {
|
||||
nar-size-threshold = 64 * 1024;
|
||||
min-size = 16 * 1024;
|
||||
avg-size = 64 * 1024;
|
||||
max-size = 256 * 1024;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
# Gitea Actions runner on box itself; jobs run directly on the host (label "native").
|
||||
den.aspects.services.gitea-runner.nixos = { config, host, pkgs, ... }: let
|
||||
home = config.users.users.${host.owner}.home;
|
||||
in {
|
||||
# Owner's GitHub SSH key, readable by jobs at $CREDENTIALS_DIRECTORY/github; never in Gitea.
|
||||
systemd.services."gitea-runner-${config.networking.hostName}".serviceConfig.LoadCredential = [ "github:${home}/.ssh/id_rsa" ];
|
||||
|
||||
services.gitea-actions-runner.instances.${config.networking.hostName} = {
|
||||
enable = true;
|
||||
name = config.networking.hostName;
|
||||
url = "http://127.0.0.1:${toString config.services.gitea.settings.server.HTTP_PORT}";
|
||||
# TOKEN=<registration token from `gitea actions generate-runner-token`>
|
||||
tokenFile = "${config.users.users.${host.owner}.home}/.config/gitea-runner/token";
|
||||
labels = [ "native:host" ];
|
||||
hostPackages = with pkgs; [ bash coreutils gnused gnugrep findutils git openssh curl jq nix nodejs attic-client ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -16,10 +16,12 @@
|
||||
defaults.email = "security@${domain}";
|
||||
|
||||
certs."mx.${domain}" = {
|
||||
listenHTTP = ":1360";
|
||||
listenHTTP = ":80";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
mailserver = {
|
||||
enable = true;
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
den.aspects.services.redlib = let port = 8975; in {
|
||||
tunnel = { subdomain = "reddit"; inherit port; };
|
||||
|
||||
nixos = { pkgs, lib, ... }: {
|
||||
services.redlib = {
|
||||
enable = true;
|
||||
|
||||
# upstream main with the wreq TLS-fingerprint fix for Reddit OAuth 401s
|
||||
package = pkgs.redlib.overrideAttrs (old: rec {
|
||||
version = "0.36.0-unstable-2026-04-24";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "redlib-org";
|
||||
repo = "redlib";
|
||||
rev = "a4d36e954cf1bd64f209cd8868c5a29edc81b374";
|
||||
hash = "sha256-siyD6A12UALQIV7BMd7zu1TaojleTEYtpxPszuhx1/Y=";
|
||||
};
|
||||
|
||||
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
hash = "sha256-eO3c7rlFna3DuO31etJ6S4c7NmcvgvIWZ1KVkNIuUqQ=";
|
||||
};
|
||||
|
||||
# BoringSSL via boring-sys2
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ (with pkgs; [
|
||||
cmake go perl git rustPlatform.bindgenHook
|
||||
]);
|
||||
|
||||
checkFlags = (old.checkFlags or [ ]) ++ [
|
||||
"--skip=oauth::tests::test_generic_web_backend"
|
||||
"--skip=oauth::tests::test_mobile_spoof_backend"
|
||||
];
|
||||
});
|
||||
|
||||
address = "127.0.0.1";
|
||||
port = port;
|
||||
|
||||
settings = {
|
||||
SFW_ONLY = "off";
|
||||
ROBOTS_DISABLE_INDEXING = "on";
|
||||
ENABLE_RSS = "on";
|
||||
THEME = "system";
|
||||
FRONT_PAGE = "default";
|
||||
LAYOUT = "card";
|
||||
WIDE = "on";
|
||||
POST_SORT = "hot";
|
||||
COMMENT_SORT = "confidence";
|
||||
BLUR_SPOILER = "off";
|
||||
SHOW_NSFW = "on";
|
||||
BLUR_NSFW = "off";
|
||||
USE_HLS = "on";
|
||||
HIDE_HLS_NOTIFICATION = "off";
|
||||
AUTOPLAY_VIDEOS = "off";
|
||||
HIDE_AWARDS = "off";
|
||||
DISABLE_VISIT_REDDIT_CONFIRMATION = "off";
|
||||
HIDE_SCORE = "off";
|
||||
HIDE_SIDEBAR_AND_SUMMARY = "off";
|
||||
FIXED_NAVBAR = "on";
|
||||
REMOVE_DEFAULT_FEEDS = "off";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.redlib = {
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
Restart = lib.mkForce "always";
|
||||
RestartSec = "30s";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -234,20 +234,19 @@
|
||||
in {
|
||||
"*".installation_mode = "blocked";
|
||||
} // (mkExtensions [
|
||||
"{cb31ec5d-c49a-4e5a-b240-16c767444f62}" # indie-wiki-buddy
|
||||
# "{cb31ec5d-c49a-4e5a-b240-16c767444f62}" # indie-wiki-buddy
|
||||
|
||||
"{1b66b5ad-408f-4300-aac6-55a68b2b24ff}" # catppuccin-mocha-no-borders
|
||||
|
||||
|
||||
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" # styl-us
|
||||
|
||||
"{3c078156-979c-498b-8990-85f7987dd929}" # sidebery
|
||||
|
||||
"{60f82f00-9ad5-4de5-b31c-b16a47c51558}" # cookie-quick-manager
|
||||
|
||||
"{88ebde3a-4581-4c6b-8019-2a05a9e3e938}" # hide-youtube-shorts
|
||||
# "{88ebde3a-4581-4c6b-8019-2a05a9e3e938}" # hide-youtube-shorts
|
||||
|
||||
"firefox@tampermonkey.net" # tampermonkey
|
||||
# "[email protected]" # tampermonkey
|
||||
|
||||
"deArrow@ajay.app" # dearrow
|
||||
|
||||
@@ -255,9 +254,9 @@
|
||||
|
||||
"uBlock0@raymondhill.net" # ublock-origin
|
||||
|
||||
"{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" # user-agent-string-switcher
|
||||
# "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" # user-agent-string-switcher
|
||||
|
||||
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}" # return-youtube-dislikes
|
||||
# "{762f9885-5a13-4abd-9c77-433dcd38b8fd}" # return-youtube-dislikes
|
||||
]) // lib.listToAttrs (map (e: lib.nameValuePair e.id {
|
||||
install_url = "file://${e.xpi}";
|
||||
installation_mode = "force_installed";
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# MagicaVoxel / MagicaCSG via umu + Proton-GE.
|
||||
# Binaries live in ./_magica (git-excluded), so this needs --impure eval.
|
||||
{
|
||||
den.aspects.software.cad.homeManager = { config, lib, pkgs, ... }:
|
||||
let
|
||||
apps = {
|
||||
voxel = { name = "MagicaVoxel"; exe = "MagicaVoxel.exe"; bin = "magicavoxel"; mime = "model/x-vox"; ext = "vox"; };
|
||||
csg = { name = "MagicaCSG"; exe = "MagicaCSG.exe"; bin = "magicacsg"; mime = "model/x-mcsg"; ext = "mcsg"; };
|
||||
};
|
||||
srcOf = app: "${config.home.homeDirectory}/nix/modules/software/cad/_magica/${app}";
|
||||
present = lib.filterAttrs (app: _: builtins.pathExists (srcOf app)) apps;
|
||||
storeOf = app: builtins.path { path = srcOf app; name = "magica-${app}"; };
|
||||
|
||||
launcher = app: a: let store = storeOf app; in pkgs.writeShellApplication {
|
||||
name = a.bin;
|
||||
runtimeInputs = [ pkgs.umu-launcher pkgs.coreutils pkgs.rsync ];
|
||||
text = ''
|
||||
base="''${XDG_DATA_HOME:-$HOME/.local/share}/magica/${app}"
|
||||
export GAMEID=umu-0
|
||||
export PROTONPATH=${pkgs.proton-ge-bin.steamcompattool}
|
||||
export WINEPREFIX="$base/prefix"
|
||||
mkdir -p "$base/app" "$WINEPREFIX"
|
||||
if [ "$(cat "$base/stamp" 2>/dev/null)" != "${store}" ]; then
|
||||
excl=()
|
||||
[ -d "$base/app/config" ] && excl=(--exclude=/config)
|
||||
rsync -r --chmod=u+w "''${excl[@]}" "${store}/" "$base/app/"
|
||||
chmod -R u+w "$base/app"
|
||||
echo "${store}" > "$base/stamp"
|
||||
fi
|
||||
mkdir -p "$base/app/cache" "$base/app/export"
|
||||
args=()
|
||||
for f in "$@"; do args+=("$(realpath -- "$f")"); done
|
||||
cd "$base/app"
|
||||
exec umu-run ${a.exe} "''${args[@]}"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = lib.mapAttrsToList launcher present;
|
||||
# Register .vox/.mcsg; our desktop entries are the only handlers, so they become the default.
|
||||
xdg.dataFile."mime/packages/magica.xml".text = ''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
${lib.concatMapStrings (a: ''
|
||||
<mime-type type="${a.mime}">
|
||||
<comment>${a.name} model</comment>
|
||||
<glob pattern="*.${a.ext}"/>
|
||||
</mime-type>
|
||||
'') (lib.attrValues apps)}</mime-info>
|
||||
'';
|
||||
xdg.desktopEntries = lib.mapAttrs' (app: a: lib.nameValuePair a.bin ({
|
||||
inherit (a) name;
|
||||
exec = "${a.bin} %f";
|
||||
categories = [ "Graphics" ];
|
||||
mimeType = [ a.mime ];
|
||||
} // lib.optionalAttrs (builtins.pathExists "${srcOf app}/config/font/icon.png") {
|
||||
icon = "${storeOf app}/config/font/icon.png";
|
||||
})) present;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# WoW Classic beta ("Forever") addons. Each output is $out/<AddonDir>/...
|
||||
{ pkgs, lib }:
|
||||
let
|
||||
release = repo: tag: file: hash: pkgs.fetchzip {
|
||||
url = "https://github.com/${repo}/releases/download/${tag}/${file}";
|
||||
stripRoot = false;
|
||||
inherit hash;
|
||||
};
|
||||
in
|
||||
{
|
||||
# Questie 12.0.3 + QuestieDB 1.0.4
|
||||
questie = release "Questie/Questie" "bundle/v12.0.3+v1.0.4" "Questie-v12.0.3+v1.0.4.zip" "sha256-jt0zI8LjM9PCgbwF1EJ/yFo2GdclRlHNtFyyh3AcfGk=";
|
||||
rxpguides = release "RestedXP/RXPGuides" "v4.11.5" "RXPGuides-v4.11.5.zip" "sha256-bPwCBpZYI1NyrzNU5O1AAwAl857Xw01VJzEtGX425dE=";
|
||||
whatstraining = release "fusionpit/WhatsTraining" "11.0.0-beta9" "WhatsTraining-11.0.0-beta9.zip" "sha256-qZg7qlFkszv5uPLxd+OnzAYbIRj+yfQS4ybZ+oIQ57Y=";
|
||||
olympus = release "dnl-gentile/olympus-addon" "v0.9.8" "Olympus-0.9.8.zip" "sha256-JBa+d77ZRwPfJez6ejrGrVv3IysCpoYvDeL2X8BRx4Q=";
|
||||
overlord = release "leliondoc/overlord-forever-addon" "1.2.3" "Overlord-1.2.3.zip" "sha256-5p8qNJNycgQr4W9TzFSgPHifrUaO6h1ca1Y63WBw9H8=";
|
||||
# Carbonite + .Gathermate2_Data/.Info/.Notes/.Quests/.Warehouse
|
||||
carbonite = release "IrcDirk/Carbonite-All-in-One-Retail-Classic" "v12.1.0-00018" "CarboniteAllinOneRetailClassic-v12.1.0-00018.zip" "sha256-VwgNBRExknG4kNM8h+S6tCSEfRjfdajvRn/cv00vzuM=";
|
||||
|
||||
# Scrap 12.1.5 has no release zip; build the packager layout from the tagged commit.
|
||||
scrap = pkgs.runCommand "wow-addon-scrap-12.1.5" {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "Jaliborc";
|
||||
repo = "Scrap";
|
||||
rev = "9a792eaa0d8297cfcc1eecfaf06b16f3fa60918c"; # "12.1.5"
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-nulN1n0r+LQolddd0f7GbYWl01GlD97xKvISkhlRxsA=";
|
||||
};
|
||||
} ''
|
||||
mkdir -p $out/Scrap_Config $out/Scrap_Merchant
|
||||
cp -r $src $out/Scrap
|
||||
for m in Config:config Merchant:merchant; do
|
||||
printf '%s\n' \
|
||||
"## Title: Scrap |cffffffff''${m%%:*}|r" \
|
||||
"## Interface: 120100, 50504, 40402, 30404, 20506, 16001, 11509" \
|
||||
"## Version: 12.1.5" \
|
||||
"## Dependencies: Scrap" \
|
||||
"## LoadOnDemand: 1" \
|
||||
"..\\Scrap\\addons\\''${m#*:}\\''${m#*:}.xml" > $out/Scrap_''${m%%:*}/Scrap_''${m%%:*}.toc
|
||||
done
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
# World of Warcraft Classic beta ("Forever"), run outside Steam via Proton in the existing Steam prefix.
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs.nix-warcraft = {
|
||||
url = "github:raccube/nix-warcraft/amirdrassil";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
den.aspects.software.gaming.homeManager = { config, lib, pkgs, osConfig ? { }, ... }:
|
||||
let
|
||||
prefix = ".local/share/Steam/steamapps/compatdata/2981697491";
|
||||
game = "${config.home.homeDirectory}/${prefix}/pfx/drive_c/Program Files (x86)/World of Warcraft/_classic_beta_";
|
||||
addons = import ./_addons.nix { inherit pkgs lib; };
|
||||
# Not fetchable from a public source (CurseForge-only): copy them here by hand.
|
||||
local = [
|
||||
"Auctionator" "Baganator" "Syndicator" "BetterFishing" "SpeedyAutoLoot"
|
||||
"ForeverStatSearch" "Leatrix_Maps" "Leatrix_Plus" "RareScanner" "TomTom"
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [ inputs.nix-warcraft.homeManagerModules.default ];
|
||||
|
||||
programs.wow = {
|
||||
enable = true;
|
||||
protonPackage = inputs.nix-warcraft.inputs.proton-ge-nix.packages.${pkgs.stdenv.hostPlatform.system}.v11.steamcompattool;
|
||||
wayland = false; # same as under Steam (Xwayland)
|
||||
prefixDir = prefix;
|
||||
# Same as the Steam shortcut: Battle.net (installed in the 3358134755 prefix) run in this prefix; it handles login.
|
||||
battleNetExe = "../3358134755/pfx/drive_c/Program Files (x86)/Battle.net/Battle.net.exe";
|
||||
uiLayoutName = osConfig.networking.hostName or "16:9";
|
||||
hideDesktopEntries = true; # its entry needs a flavourExeMap key classic-beta lacks
|
||||
versions.classic-beta = {
|
||||
displayName = "World of Warcraft Classic Beta";
|
||||
executable = "pfx/drive_c/Program Files (x86)/World of Warcraft/_classic_beta_/WowB.exe";
|
||||
addonDir = "${game}/Interface/AddOns";
|
||||
wtfDir = "${game}/WTF";
|
||||
addonPackages = lib.attrValues addons;
|
||||
developmentAddons = lib.genAttrs local (d: "${config.home.homeDirectory}/.local/share/wow-addons/${d}");
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -7,9 +7,8 @@
|
||||
|
||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
|
||||
nix.settings.substituters = [ "https://attic.xuyh0120.win/lantian" "https://cache.xinux.uz" ];
|
||||
nix.settings.substituters = [ "https://cache.xinux.uz" ];
|
||||
nix.settings.trusted-public-keys = [
|
||||
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
|
||||
"cache.xinux.uz:BXCrtqejFjWzWEB9YuGB7X2MV4ttBur1N8BkwQRdH+0="
|
||||
];
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user