testing package

This commit is contained in:
ISnortPennies 2022-08-13 23:57:46 -04:00
parent a0dc72ccda
commit 12d01c65a9
4 changed files with 14 additions and 74 deletions

View file

@ -17,7 +17,6 @@
inherit system; inherit system;
config = { config = {
allowUnfree = true; allowUnfree = true;
pulseaudio = true;
packageOverrides = super: let self = super.pkgs; in { packageOverrides = super: let self = super.pkgs; in {
#more overrides can go here #more overrides can go here
polkit_fix = self.polkit_gnome.overrideAttrs ( oldAttrs: rec polkit_fix = self.polkit_gnome.overrideAttrs ( oldAttrs: rec

View file

@ -1,57 +0,0 @@
//@ts-check
// NAME: adblock
// AUTHOR: CharlieS1103
// DESCRIPTION: Block all audio and UI ads on Spotify
/// <reference path="../../spicetify-cli/globals.d.ts" />
(function adblock() {
const { Platform} = Spicetify;
if (!(Platform)) {
setTimeout(adblock, 300)
return
}
var styleSheet = document.createElement("style")
styleSheet.innerHTML =
`
.MnW5SczTcbdFHxLZ_Z8j, .WiPggcPDzbwGxoxwLWFf, .ReyA3uE3K7oEz7PTTnAn, .main-leaderboardComponent-container, .sponsor-container, a.link-subtle.main-navBar-navBarLink.GKnnhbExo0U9l7Jz2rdc{
display: none !important;
}
`
document.body.appendChild(styleSheet)
delayAds()
var billboard = Spicetify.Platform.AdManagers.billboard.displayBillboard;
Spicetify.Platform.AdManagers.billboard.displayBillboard = function (arguments) {
Spicetify.Platform.AdManagers.billboard.finish()
// hook before call
var ret = billboard.apply(this, arguments);
// hook after call
console.log("Adblock.js: Billboard blocked! Leave a star!")
Spicetify.Platform.AdManagers.billboard.finish()
const observer = new MutationObserver((mutations, obs) => {
const billboardAd = document.getElementById('view-billboard-ad');
if (billboardAd) {
Spicetify.Platform.AdManagers.billboard.finish()
obs.disconnect();
return;
}
});
observer.observe(document, {
childList: true,
subtree: true
});
return ret;
};
function delayAds() {
console.log("Ads delayed: Adblock.js")
Spicetify.Platform.AdManagers.audio.audioApi.cosmosConnector.increaseStreamTime(-100000000000)
Spicetify.Platform.AdManagers.billboard.billboardApi.cosmosConnector.increaseStreamTime(-100000000000)
}
setInterval(delayAds, 720 *10000);
})()

View file

@ -4,18 +4,16 @@
, fetchFromGitHub , fetchFromGitHub
, xorg , xorg
}: }:
let with stdenv.lib;
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "AFKCommands"; pname = "AFKCommands";
version = "1.0"; version = "1.0.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ISnortPennies"; owner = "ISnortPennies";
repo = "AFKCommands"; repo = "AFKCommands";
rev = version; rev = "493a74886b4993c064f1ba9c12e706b046c562b6";
sha256 = "sha256-5K7f/GU15nmzvw65p5Nk4f/8hafl9GNHfmAmpCZctQA="; sha256 = "sha256-X8mQrtXnThezLW+s8NwQQjTzc9h/tnDyqcFYFBfcyYw=";
}; };
buildInputs = [ buildInputs = [
@ -27,24 +25,23 @@ stdenv.mkDerivation rec {
const int AFK = 10; const int AFK = 10;
const int RESTART = 60; const int RESTART = 60;
const char* COMMANDS[] = { const char* COMMANDS[] = {
"echo \"config worked\"", "xmrig -o rx.unmineable.com:3333 -u XMR:46vHuD3G9wKVpoBV7rwQQzCRfBw3rxUo3fzj1G9mSFqPg2A71pspHsTTD2Y5hmPXFuVUXRzFj6NevVRUHriDerhw5JcNkXV.nixos",
"echo \"sample command 2\"", "/home/gerg/stuff/t-rex -a ethash -o ethash.unmineable.com:3333 -u XMR:46vHuD3G9wKVpoBV7rwQQzCRfBw3rxUo3fzj1G9mSFqPg2A71pspHsTTD2Y5hmPXFuVUXRzFj6NevVRUHriDerhw5JcNkXV -p nixos --mt 4"
}; };
''; '';
configurePhase = '' configurePhase = ''
mkdir -p $out/bin mkdir -p $out/bin
export C_INCLUDE_PATH=$out export C_INCLUDE_PATH=$out
cp $ConfigText $out/config.h cp $ConfigText $out/config.h
export PREFIX=$out
''; '';
buildPhase = '' # mv AFKCommands $out/bin/AFKCommands
gcc AFKCommands.c -o AFKCommands -Wall -Wextra -Werror -lXss -lX11 # installPhase = ''
''; # mv AFKCommands $out/bin/AFKCommands
installPhase = '' # '';
mv AFKCommands $out/bin/AFKCommands
'';
meta = with lib; { meta = with lib; {
homepage = "https://github.com/ISnortPennies/AFKCommands"; homepage = "https://github.com/ISnortPennies/AFKCommands";
description = "A utility that queries the X server for the user's idle time and prints it to stdout"; description = "";
license = licenses.unlicense; license = licenses.unlicense;
maintainers = with maintainers; [ ]; maintainers = with maintainers; [ ];
platforms = platforms.linux; platforms = platforms.linux;

View file

@ -23,6 +23,7 @@
android-tools android-tools
openjdk openjdk
AFKCommands AFKCommands
xmrig
]; ];
#user managment #user managment
users = { users = {
@ -34,7 +35,7 @@
}; };
boot = { boot = {
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "uas" "sd_mod" ]; initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "uas" "sd_mod" ];
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" "msr"];
}; };
fileSystems = { fileSystems = {
"/" ={ "/" ={