migrated many of my scripts, and minor pack adjstm

This commit is contained in:
2023-08-20 03:01:27 -06:00
parent a178298564
commit c25dfd3916
2 changed files with 118 additions and 85 deletions

View File

@@ -56,16 +56,24 @@ let
config = config.nixpkgs.config;
};
nix-gaming = import (builtins.fetchTarball "https://github.com/fufexan/nix-gaming/archive/master.tar.gz");
nextcloud_scrapsync = pkgs.writeScriptBin
jawz_nextcloud_scrapsync = pkgs.writeScriptBin
"nextcloud_scrapsync" (builtins.readFile ./scripts/nextcloud_scrapsync.sh);
manage_library = pkgs.writeScriptBin
jawz_manage_library = pkgs.writeScriptBin
"manage_library" (builtins.readFile ./scripts/manage_library.sh);
ffmpreg = pkgs.writeScriptBin
jawz_ffmpreg = pkgs.writeScriptBin
"ffmpreg" (builtins.readFile ./scripts/ffmpreg.sh);
ffmpeg4discord = pkgs.writeScriptBin
jawz_ffmpeg4discord = pkgs.writeScriptBin
"ffmpeg4discord" (builtins.readFile ./scripts/ffmpeg4discord.py);
chat-dl = pkgs.writeScriptBin
jawz_chat-dl = pkgs.writeScriptBin
"chat-dl" (builtins.readFile ./scripts/chat-dl.sh);
jawz_tasks = pkgs.writeScriptBin
"tasks" (builtins.readFile ./scripts/tasks.sh);
jawz_split_dir = pkgs.writeScriptBin
"split_dir" (builtins.readFile ./scripts/split_dir.sh);
jawz_pika_list = pkgs.writeScriptBin
"pika_list" (builtins.readFile ./scripts/pika_list.sh);
jawz_run = pkgs.writeScriptBin
"run" (builtins.readFile ./scripts/run.sh);
in
{ # Remember to close this bracket at the end of the document
#+end_src
@@ -290,7 +298,7 @@ wineWowPackages.full
vulkan-tools
# nix-gaming.packages.${pkgs.hostPlatform.system}.wine-tkg
winetricks
nix-gaming.packages.${pkgs.hostPlatform.system}.wine-discord-ipc-bridge
# nix-gaming.packages.${pkgs.hostPlatform.system}.wine-discord-ipc-bridge
# grapejuice # roblox manager
# minecraft # minecraft official launcher
parsec-bin # remote gaming with friends
@@ -306,7 +314,7 @@ this are not used as often as I wish…
libreoffice-fresh # office, but based
calibre # ugly af eBook library manager
foliate # gtk eBook reader
gnome-feeds # feed reader, maybe will replace with nextcloud
newsflash # feed reader, syncs with nextcloud
wike # gtk wikipedia wow!
unstable.furtherance # I made this one tehee track time utility
gnome.simple-scan # scanner
@@ -391,11 +399,14 @@ torrenttools # create torrent files from the terminal!
lm_sensors # for extension, displays cpu temp
# My own scripts
nextcloud_scrapsync
ffmpeg4discord
ffmpreg
manage_library
chat-dl
jawz_ffmpeg4discord
jawz_ffmpreg
jawz_manage_library
jawz_chat-dl
jawz_tasks
jawz_split_dir
jawz_pika_list
jawz_run
#+end_src
** DEVELOPMENT PACKAGES
@@ -421,7 +432,7 @@ bashdb # autocomplete
shellcheck # linting
shfmt # a shell parser and formatter
file # required by my tasks script?
gnome.zenity # dependency of my scripts
# gnome.zenity # dependency of my scripts
xclip # manipulate clipboard from scripts
# NIX
@@ -496,18 +507,6 @@ symbola
propagatedBuildInputs =
[ pyyaml types-pyyaml ];
})
(buildPythonApplication rec {
pname = "classifier";
version = "2.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-yHtc0qNZbKIkhhxrh0Zh5KWWsC/aU51WX1oEPVN9nOg=";
};
doCheck = false;
buildInputs = [ setuptools ];
propagatedBuildInputs =
[ arrow ];
})
(buildPythonApplication rec {
pname = "ffpb";
version = "0.4.1";
@@ -606,8 +605,8 @@ programs.bash = {
shellAliases = {
ls = "exa --icons --group-directories-first --no-permissions --no-user --no-time";
edit = "emacsclient -t";
comic = "download -u jawz -i $(cat $lc | fzf --multi --exact -i)";
gallery = "download -u jawz -i $(cat $lw | fzf --multi --exact -i)";
comic = "download -u jawz -i $(cat $LC | fzf --multi --exact -i)";
gallery = "download -u jawz -i $(cat $LW | fzf --multi --exact -i)";
open_gallery = "cd /mnt/disk2/scrapping/JawZ/gallery-dl && nautilus \
\"$(fd . ./ Husbands -tdirectory -d 1 | fzf -i)\"";
unique_extensions = "fd -tf | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]' | sort | uniq --count | sort -rn";
@@ -636,9 +635,9 @@ programs.bash = {
/home/jawz/.local/bin/pokemon-colorscripts -r --no-title
# Lists
list_root=${config.home.homeDirectory}/.config/jawz/lists/jawz
export lw=$list_root/watch.txt
export li=$list_root/instant.txt
export lc=$list_root/comic.txt
export LW=$list_root/watch.txt
export LI=$list_root/instant.txt
export LC=$list_root/comic.txt
export command_timeout=30
# GPG_TTY=$(tty)
@@ -834,7 +833,7 @@ snapraid = {
"/mnt/parity/snapraid.parity"
];
extraConfig = ''
autosave 50
autosave 5000
'';
exclude = [
"/tmp/"
@@ -918,14 +917,6 @@ services = {
defaultEditor = true;
package = pkgs.emacs;
};
# udev = {
# packages = with pkgs; [ gnome.gnome-settings-daemon ];
# extraRules = ''
# SUBSYSTEM=="hidraw", ATTRS{idVendor}=="256c", ATTRS{idProduct}=="006d", MODE="0666"
# SUBSYSTEM=="usb", ATTRS{idVendor}=="256c", ATTRS{idProduct}=="006d", MODE="0666"
# SUBSYSTEM=="input", ATTRS{idVendor}=="256c", ATTRS{idProduct}=="006d", ENV{LIBINPUT_IGNORE_DEVICE}="1"
# '';
# };
};
#+end_src
@@ -960,11 +951,11 @@ systemd.services = {
wantedBy = [ "default.target" ];
path = [
pkgs.bash
nextcloud_scrapsync
jawz_nextcloud_scrapsync
];
serviceConfig = {
RestartSec = 30;
ExecStart = "${nextcloud_scrapsync}/bin/nextcloud_scrapsync";
ExecStart = "${jawz_nextcloud_scrapsync}/bin/nextcloud_scrapsync";
};
};
};
@@ -1008,12 +999,40 @@ systemd.user.services = {
wantedBy = [ "default.target" ];
path = [
pkgs.bash
manage_library
pkgs.nix
jawz_manage_library
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "${manage_library}/bin/manage_library";
ExecStart = "${jawz_manage_library}/bin/manage_library";
};
};
"tasks" = {
restartIfChanged = true;
description = "Run a tasks script which keeps a lot of things organized";
wantedBy = [ "default.target" ];
path = [
pkgs.bash
pkgs.nix
jawz_tasks
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "${jawz_tasks}/bin/tasks";
};
};
};
systemd.user.timers = {
"tasks" = {
enable = true;
description = "Run a tasks script which keeps a lot of things organized";
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "1min";
OnUnitActivateSec = "5m";
Persistent = true;
};
};
};