added stuff
This commit is contained in:
parent
e8d9044d2b
commit
9d0ebdfbd0
907 changed files with 70990 additions and 0 deletions
9
nyx/homes/notashelf/packages/cli/default.nix
Normal file
9
nyx/homes/notashelf/packages/cli/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
imports = [
|
||||
./shared.nix
|
||||
./desktop.nix
|
||||
./wayland.nix
|
||||
./whitehat.nix
|
||||
./server.nix
|
||||
];
|
||||
}
|
29
nyx/homes/notashelf/packages/cli/desktop.nix
Normal file
29
nyx/homes/notashelf/packages/cli/desktop.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig) modules;
|
||||
|
||||
prg = modules.system.programs;
|
||||
dev = modules.device;
|
||||
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
|
||||
in {
|
||||
config = mkIf ((builtins.elem dev.type acceptedTypes) && prg.cli.enable) {
|
||||
home.packages = with pkgs; [
|
||||
# CLI
|
||||
libnotify
|
||||
imagemagick
|
||||
gcc
|
||||
cmake
|
||||
bitwarden-cli
|
||||
trash-cli
|
||||
slides
|
||||
brightnessctl
|
||||
tesseract5
|
||||
pamixer
|
||||
];
|
||||
};
|
||||
}
|
18
nyx/homes/notashelf/packages/cli/server.nix
Normal file
18
nyx/homes/notashelf/packages/cli/server.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig) modules;
|
||||
|
||||
prg = modules.system.programs;
|
||||
dev = modules.device;
|
||||
in {
|
||||
config = mkIf (prg.cli.enable && (builtins.elem dev.type ["server" "hybrid"])) {
|
||||
home.packages = with pkgs; [
|
||||
wireguard-tools
|
||||
];
|
||||
};
|
||||
}
|
40
nyx/homes/notashelf/packages/cli/shared.nix
Normal file
40
nyx/homes/notashelf/packages/cli/shared.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs',
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig) modules;
|
||||
|
||||
prg = modules.system.programs;
|
||||
in {
|
||||
config = mkIf prg.cli.enable {
|
||||
home.packages = with pkgs; [
|
||||
# packages from inputs
|
||||
inputs'.agenix.packages.default
|
||||
inputs'.nyxpkgs.packages.cloneit
|
||||
|
||||
# CLI packages from nixpkgs
|
||||
catimg
|
||||
duf
|
||||
todo
|
||||
hyperfine
|
||||
fzf
|
||||
file
|
||||
unzip
|
||||
ripgrep
|
||||
rsync
|
||||
fd
|
||||
jq
|
||||
figlet
|
||||
lm_sensors
|
||||
dconf
|
||||
nitch
|
||||
skim
|
||||
p7zip
|
||||
btop
|
||||
];
|
||||
};
|
||||
}
|
50
nyx/homes/notashelf/packages/cli/wayland.nix
Normal file
50
nyx/homes/notashelf/packages/cli/wayland.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
dev = osConfig.modules.device;
|
||||
env = osConfig.modules.usrEnv;
|
||||
acceptedTypes = ["laptop" "desktop" "hybrid" "lite"];
|
||||
in {
|
||||
config = mkIf ((builtins.elem dev.type acceptedTypes) && env.isWayland) {
|
||||
home.packages = with pkgs; [
|
||||
# CLI
|
||||
grim
|
||||
slurp
|
||||
grim
|
||||
wl-clipboard
|
||||
pngquant
|
||||
wf-recorder
|
||||
(pkgs.writeShellApplication {
|
||||
name = "ocr";
|
||||
runtimeInputs = with pkgs; [tesseract grim slurp];
|
||||
text = ''
|
||||
set -x
|
||||
|
||||
echo "Generating a random ID..."
|
||||
id=$(tr -dc 'a-zA-Z0-9' </dev/urandom | fold -w 6 | head -n 1 || true)
|
||||
echo "Image ID: $id"
|
||||
|
||||
echo "Taking screenshot..."
|
||||
grim -g "$(slurp -w 0 -b eebebed2)" /tmp/ocr-"$id".png
|
||||
|
||||
echo "Running OCR..."
|
||||
tesseract /tmp/ocr-"$id".png - | wl-copy
|
||||
echo -en "File saved to /tmp/ocr-'$id'.png\n"
|
||||
|
||||
|
||||
echo "Sending notification..."
|
||||
notify-send "OCR " "Text copied!"
|
||||
|
||||
echo "Cleaning up..."
|
||||
rm /tmp/ocr-"$id".png -vf
|
||||
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
24
nyx/homes/notashelf/packages/cli/whitehat.nix
Normal file
24
nyx/homes/notashelf/packages/cli/whitehat.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig) modules;
|
||||
|
||||
prg = modules.system.programs;
|
||||
dev = modules.device;
|
||||
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
|
||||
in {
|
||||
config = mkIf ((builtins.elem dev.type acceptedTypes) && prg.cli.enable) {
|
||||
home.packages = with pkgs; [
|
||||
# CLI
|
||||
binwalk
|
||||
binutils
|
||||
diffoscopeMinimal
|
||||
nmap
|
||||
nmapsi4
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue