Compare commits
10 Commits
b8549ca187
...
4f5049f3ab
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f5049f3ab | |||
| 6deea63497 | |||
| ee6c1f367f | |||
| 6324aaa7b8 | |||
| 6384d8ad17 | |||
| 0c137aaef5 | |||
| 1b35e46f1e | |||
| 597d0bfca2 | |||
| 4d9eaa65a2 | |||
| 4eef0b8578 |
8
flake.lock
generated
8
flake.lock
generated
@ -2,16 +2,16 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1746557022,
|
||||
"narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=",
|
||||
"lastModified": 1753345091,
|
||||
"narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860",
|
||||
"rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.11",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
description = "Nix flake for the activity logging script";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
# sudoku-solver.url = "path:./src/sudoku-hs";
|
||||
};
|
||||
outputs =
|
||||
@ -50,6 +50,7 @@
|
||||
pano = pkgs.callPackage ./pkgs/pano/default.nix { };
|
||||
mealie = pkgs.callPackage ./pkgs/mealie/package.nix { };
|
||||
vdhcoapp = pkgs.callPackage ./pkgs/vdhcoapp/default.nix { };
|
||||
resilio = pkgs.callPackage ./pkgs/resilio/package.nix { };
|
||||
# sudoku-solver = inputs.sudoku-solver.packages.${system}.default;
|
||||
}
|
||||
// generatePackages {
|
||||
|
||||
61
pkgs/resilio/package.nix
Normal file
61
pkgs/resilio/package.nix
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
autoPatchelfHook,
|
||||
libxcrypt-legacy,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "resilio-sync";
|
||||
version = "2.8.1.1390";
|
||||
|
||||
src =
|
||||
{
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://download-cdn.resilio.com/${version}/linux/x64/0/resilio-sync_x64.tar.gz";
|
||||
sha256 = "sha256-XrfE2frDxOS32MzO7gpJEsMd0WY+b7TS0h/H94M7Py4=";
|
||||
};
|
||||
|
||||
i686-linux = fetchurl {
|
||||
url = "https://download-cdn.resilio.com/${version}/linux/i386/0/resilio-sync_i386.tar.gz";
|
||||
sha256 = "sha256-tWwb9DHLlXeyimzyo/yxVKqlkP3jlAxT2Yzs6h2bIgs=";
|
||||
};
|
||||
|
||||
aarch64-linux = fetchurl {
|
||||
url = "https://download-cdn.resilio.com/${version}/linux/arm64/0/resilio-sync_arm64.tar.gz";
|
||||
sha256 = "sha256-b859DqxTfnBMMeiwXlGKTQ+Mpmr2Rpg24l/GNkxSWbA=";
|
||||
};
|
||||
}
|
||||
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
dontStrip = true; # Don't strip, otherwise patching the rpaths breaks
|
||||
sourceRoot = ".";
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
stdenv.cc.libc
|
||||
libxcrypt-legacy
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -D rslsync "$out/bin/rslsync"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automatically sync files via secure, distributed technology";
|
||||
homepage = "https://www.resilio.com/";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.unfreeRedistributable;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [
|
||||
domenkozar
|
||||
thoughtpolice
|
||||
cwoac
|
||||
];
|
||||
mainProgram = "rslsync";
|
||||
};
|
||||
}
|
||||
@ -7,16 +7,20 @@
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "qbit-manage";
|
||||
version = "4.1.14";
|
||||
version = "4.3.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "StuffAnThings";
|
||||
repo = "qbit_manage";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-JTQZlJ2d0oOpT8lIf9mgQ/onTs5jiWfvzFx0XBjbCQo=";
|
||||
hash = "sha256-Wj1s11PwHfH4hDGEn0jW/REO2gI7+AGyb2B/QKUhlyk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
rm LICENSE
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
python3.pkgs.setuptools
|
||||
python3.pkgs.wheel
|
||||
@ -27,12 +31,27 @@ python3.pkgs.buildPythonApplication rec {
|
||||
gitpython
|
||||
humanize
|
||||
pytimeparse2
|
||||
qbittorrent-api
|
||||
bencode-py
|
||||
requests
|
||||
retrying
|
||||
ruamel-yaml
|
||||
schedule
|
||||
(callPackage ./bencodepy.nix { })
|
||||
(callPackage ./qbittorrent-api.nix {
|
||||
inherit lib;
|
||||
inherit (python3.pkgs)
|
||||
buildPythonPackage
|
||||
fetchPypi
|
||||
|
||||
# build-system
|
||||
setuptools
|
||||
setuptools-scm
|
||||
|
||||
# dependencies
|
||||
packaging
|
||||
requests
|
||||
urllib3
|
||||
;
|
||||
})
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
||||
25
pkgs_wip/qbit-manage.patch
Normal file
25
pkgs_wip/qbit-manage.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff --git a/modules/logs.py b/modules/logs.py
|
||||
index 1234567..abcdef0 100644
|
||||
--- a/modules/logs.py
|
||||
+++ b/modules/logs.py
|
||||
@@ class MyLogger:
|
||||
def __init__(
|
||||
self, logger_name, log_file, log_level, default_dir, screen_width, separating_character, ignore_ghost, log_size, log_count
|
||||
):
|
||||
- self.log_dir = os.path.join(default_dir, LOG_DIR)
|
||||
- self.main_log = log_file if os.path.exists(os.path.dirname(log_file)) else os.path.join(self.log_dir, log_file)
|
||||
+ self.log_dir = None
|
||||
+ self.main_log = log_file
|
||||
self.main_handler = None
|
||||
self.save_errors = False
|
||||
self.saved_errors = []
|
||||
self.config_handlers = {}
|
||||
self.secrets = set()
|
||||
self.spacing = 0
|
||||
self.log_size = log_size
|
||||
self.log_count = log_count
|
||||
- os.makedirs(self.log_dir, exist_ok=True)
|
||||
|
||||
self._logger = logging.getLogger(self.logger_name)
|
||||
logging.DRYRUN = DRYRUN
|
||||
logging.addLevelName(DRYRUN, "DRYRUN")
|
||||
50
pkgs_wip/qbittorrent-api.nix
Normal file
50
pkgs_wip/qbittorrent-api.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
|
||||
# dependencies
|
||||
packaging,
|
||||
requests,
|
||||
urllib3,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qbittorrent-api";
|
||||
version = "2025.5.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "qbittorrent_api";
|
||||
inherit version;
|
||||
hash = "sha256-NKD5weGufhbeUOlGUXUsjZejz1TCo+GgXGqDdzmaDjA=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
packaging
|
||||
requests
|
||||
urllib3
|
||||
];
|
||||
|
||||
# Tests require internet access
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "qbittorrentapi" ];
|
||||
|
||||
meta = {
|
||||
description = "Python client implementation for qBittorrent's Web API";
|
||||
homepage = "https://github.com/rmartin16/qbittorrent-api";
|
||||
changelog = "https://github.com/rmartin16/qbittorrent-api/blob/v${version}/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ savyajha ];
|
||||
};
|
||||
}
|
||||
11
src/not flake/deprecated-rewrite/discord_chatlogs
Normal file → Executable file
11
src/not flake/deprecated-rewrite/discord_chatlogs
Normal file → Executable file
@ -1,14 +1,15 @@
|
||||
#!/usr/bin/env fish
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i fish -p fish discordchatexporter-cli
|
||||
|
||||
read -gP "Insert Token: " token
|
||||
read -gP "Insert an after date: " dateInput
|
||||
set afterDate (date "+%F %H:%M:%S" --date="$dateInput")
|
||||
set beforeDate (date "+%F %H:%M:%S")
|
||||
|
||||
set guildIDs 828901086722785281 659186066724749312 \
|
||||
618655243554521089 111912780377985024
|
||||
set guildNames 'The fattest pussy club' CreativeCringeCorner \
|
||||
'Bound Art With Lore and Less Minors' 'Webcomic Land'
|
||||
# set guildIDs 828901086722785281 659186066724749312 \
|
||||
# 618655243554521089 111912780377985024
|
||||
# set guildNames 'The fattest pussy club' CreativeCringeCorner \
|
||||
# 'Bound Art With Lore and Less Minors' 'Webcomic Land'
|
||||
set dmIDs 808310797004308500 539621978504560640 810121293818363934 816078347972116491
|
||||
set dmNames Hurricane DeftBeck Tomayto Weenie
|
||||
set baseDir $HOME/Temp/Discord
|
||||
|
||||
@ -15,7 +15,7 @@ download)
|
||||
--add-entry="Link:" \
|
||||
--entry-text "$(xclip -o -sel clip)")
|
||||
if [ -n "$ENTRY" ]; then
|
||||
cmd="ssh server \"download -u jawz"
|
||||
cmd="download -u jawz"
|
||||
|
||||
if ! zenity --question --text "Use archive database?" \
|
||||
--ok-label="Yes" --cancel-label="Cancel"; then
|
||||
@ -26,7 +26,7 @@ download)
|
||||
cmd+=" -s"
|
||||
fi
|
||||
|
||||
cmd+=" -i \"$ENTRY\" \""
|
||||
cmd+=" -i \"$ENTRY\" "
|
||||
ghostty -e "$cmd"
|
||||
else
|
||||
zenity --error --width=250 \
|
||||
|
||||
@ -10,7 +10,7 @@ fi
|
||||
root=/srv/pool/scrapping
|
||||
|
||||
cd $root || exit
|
||||
set -- Aqp Ghekre
|
||||
set -- Aqp ElasticWind
|
||||
for user in "$@"; do
|
||||
originDir=$root/$user
|
||||
destDir=/srv/pool/nextcloud/$user/files/Requested
|
||||
@ -44,12 +44,12 @@ for user in "$@"; do
|
||||
|
||||
find ./ -mindepth 1 -type d -empty -delete
|
||||
|
||||
chown 987:988 -R "$destDir"
|
||||
chown "$(id -u nextcloud)":"$(id -g nextcloud)" -R "$destDir"
|
||||
find "$destDir" -type d -exec chmod -R 755 {} \;
|
||||
find "$destDir" -type f -exec chmod -R 644 {} \;
|
||||
|
||||
if [ -d "$destDirDup" ]; then
|
||||
chown 987:988 -R "$destDirDup"
|
||||
chown "$(id -u nextcloud)":"$(id -g nextcloud)" -R "$destDir"
|
||||
find "$destDirDup" -type d -exec chmod -R 755 {} \;
|
||||
find "$destDirDup" -type f -exec chmod -R 644 {} \;
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user