mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
testing package
This commit is contained in:
parent
a0dc72ccda
commit
12d01c65a9
4 changed files with 14 additions and 74 deletions
|
|
@ -17,7 +17,6 @@
|
|||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
pulseaudio = true;
|
||||
packageOverrides = super: let self = super.pkgs; in {
|
||||
#more overrides can go here
|
||||
polkit_fix = self.polkit_gnome.overrideAttrs ( oldAttrs: rec
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
||||
})()
|
||||
|
|
@ -4,18 +4,16 @@
|
|||
, fetchFromGitHub
|
||||
, xorg
|
||||
}:
|
||||
let
|
||||
|
||||
in
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "AFKCommands";
|
||||
version = "1.0";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ISnortPennies";
|
||||
repo = "AFKCommands";
|
||||
rev = version;
|
||||
sha256 = "sha256-5K7f/GU15nmzvw65p5Nk4f/8hafl9GNHfmAmpCZctQA=";
|
||||
rev = "493a74886b4993c064f1ba9c12e706b046c562b6";
|
||||
sha256 = "sha256-X8mQrtXnThezLW+s8NwQQjTzc9h/tnDyqcFYFBfcyYw=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
|
@ -27,24 +25,23 @@ stdenv.mkDerivation rec {
|
|||
const int AFK = 10;
|
||||
const int RESTART = 60;
|
||||
const char* COMMANDS[] = {
|
||||
"echo \"config worked\"",
|
||||
"echo \"sample command 2\"",
|
||||
"xmrig -o rx.unmineable.com:3333 -u XMR:46vHuD3G9wKVpoBV7rwQQzCRfBw3rxUo3fzj1G9mSFqPg2A71pspHsTTD2Y5hmPXFuVUXRzFj6NevVRUHriDerhw5JcNkXV.nixos",
|
||||
"/home/gerg/stuff/t-rex -a ethash -o ethash.unmineable.com:3333 -u XMR:46vHuD3G9wKVpoBV7rwQQzCRfBw3rxUo3fzj1G9mSFqPg2A71pspHsTTD2Y5hmPXFuVUXRzFj6NevVRUHriDerhw5JcNkXV -p nixos --mt 4"
|
||||
};
|
||||
'';
|
||||
configurePhase = ''
|
||||
mkdir -p $out/bin
|
||||
export C_INCLUDE_PATH=$out
|
||||
cp $ConfigText $out/config.h
|
||||
export PREFIX=$out
|
||||
'';
|
||||
buildPhase = ''
|
||||
gcc AFKCommands.c -o AFKCommands -Wall -Wextra -Werror -lXss -lX11
|
||||
'';
|
||||
installPhase = ''
|
||||
mv AFKCommands $out/bin/AFKCommands
|
||||
'';
|
||||
# mv AFKCommands $out/bin/AFKCommands
|
||||
# installPhase = ''
|
||||
# mv AFKCommands $out/bin/AFKCommands
|
||||
# '';
|
||||
meta = with lib; {
|
||||
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;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
android-tools
|
||||
openjdk
|
||||
AFKCommands
|
||||
xmrig
|
||||
];
|
||||
#user managment
|
||||
users = {
|
||||
|
|
@ -34,7 +35,7 @@
|
|||
};
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "uas" "sd_mod" ];
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
kernelModules = [ "kvm-amd" "msr"];
|
||||
};
|
||||
fileSystems = {
|
||||
"/" ={
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue