This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

5pkgs: remove unused packages

-422
-42
5pkgs/emot-menu/default.nix
··· 1 - { 2 - coreutils, 3 - dmenu, 4 - gnused, 5 - writers, 6 - writeText, 7 - xdotool, 8 - }: 9 - let 10 - 11 - emoticons = writeText "emoticons" '' 12 - ¯\(°_o)/¯ | dunno lol shrug dlol 13 - ¯\_(ツ)_/¯ | dunno lol shrug dlol 14 - ( ͡° ͜ʖ ͡°) | lenny 15 - ¯\_( ͡° ͜ʖ ͡°)_/¯ | lenny shrug dlol 16 - ( ゚д゚) | aaah sad noo 17 - ヽ(^o^)丿 | hi yay hello 18 - (^o^; | ups hehe 19 - (^∇^) | yay 20 - ┗(`皿´)┛ | angry argh 21 - ヾ(^_^) byebye!! | bye 22 - <(^.^<) <(^.^)> (>^.^)> (7^.^)7 (>^.^<) | dance 23 - (-.-)Zzz... | sleep 24 - (∩╹□╹∩) | oh noes woot 25 - ™ | tm 26 - ζ | zeta 27 - (╯°□°)╯ ┻━┻ | table flip 28 - (」゜ロ゜)」 | why woot 29 - (_゜_゜_) | gloom I see you 30 - ༼ ༎ຶ ෴ ༎ຶ༽ | sad 31 - (\/) (°,,,,°) (\/) | krebs 32 - ''; 33 - 34 - in 35 - writers.writeDashBin "emoticons" '' 36 - set -efu 37 - 38 - data=$(${coreutils}/bin/cat ${emoticons}) 39 - emoticon=$(echo "$data" | ${dmenu}/bin/dmenu | ${gnused}/bin/sed 's/ | .*//') 40 - ${xdotool}/bin/xdotool type --clearmodifiers -- "$emoticon" 41 - exit 0 42 - ''
-30
5pkgs/generate-krebs-intermediate-ca/default.nix
··· 1 - { pkgs }: 2 - pkgs.writers.writeDashBin "generate-intermediate-ca" '' 3 - TMPDIR=$(mktemp -d) 4 - trap "rm -rf $TMPDIR;" INT TERM EXIT 5 - mkdir -p "$TMPDIR/krebs" 6 - pass show brain/ca/ca.key > "$TMPDIR/krebs/ca.key" 7 - pass show brain/ca/ca.crt > "$TMPDIR/krebs/ca.crt" 8 - export STEPPATH="$TMPDIR/step" 9 - cat << EOF > "$TMPDIR/intermediate.tpl" 10 - { 11 - "subject": {{ toJson .Subject }}, 12 - "keyUsage": ["certSign", "crlSign"], 13 - "basicConstraints": { 14 - "isCA": true, 15 - "maxPathLen": 0 16 - }, 17 - "nameConstraints": { 18 - "critical": true, 19 - "permittedDNSDomains": ["r" ,"w"] 20 - } 21 - } 22 - EOF 23 - 24 - ${pkgs.step-cli}/bin/step certificate create "Krebs ACME CA" intermediate_ca.crt intermediate_ca.key \ 25 - --template "$TMPDIR/intermediate.tpl" \ 26 - --not-after 8760h \ 27 - --ca "$TMPDIR/krebs/ca.crt" \ 28 - --ca-key "$TMPDIR/krebs/ca.key" \ 29 - --no-password --insecure 30 - ''
-12
5pkgs/graphml2json/default.nix
··· 1 - { pkgs, ... }: 2 - pkgs.writers.writePython3Bin "graphml2json" { libraries = [ pkgs.python3Packages.networkx ]; } '' 3 - import networkx as nx 4 - import json 5 - import sys 6 - 7 - 8 - G = nx.read_graphml(sys.argv[1]) 9 - data = nx.readwrite.json_graph.node_link_data(G) 10 - 11 - print(json.dumps(data, indent=2)) 12 - ''
-15
5pkgs/htmlparser/default.nix
··· 1 - { buildGoModule, fetchFromGitHub }: 2 - 3 - buildGoModule rec { 4 - pname = "htmlparser"; 5 - version = "v1.0.0"; 6 - 7 - src = fetchFromGitHub { 8 - owner = "htmlparser"; 9 - repo = "htmlparser"; 10 - rev = "02f964ebd24c296dcfa56c357bb8dedde0f39757"; 11 - sha256 = "1k19rdpjf5sdyjfl233y6bsfgkcnv799ivrh2vkw22almg4243ar"; 12 - }; 13 - 14 - vendorSha256 = "0qkd587z4n372y4lqyzjqc1qlsi3525ah99vdm5dqq4jidcd5h7w"; 15 - }
-35
5pkgs/install-system/default.nix
··· 1 - { pkgs }: 2 - pkgs.writers.writeDashBin "install-system" '' 3 - set -efux 4 - SYSTEM=$1 5 - TARGET=$2 6 - # format 7 - if ! (sshn "$TARGET" -- mountpoint /mnt); then 8 - if ! (sshn "$TARGET" -- type -p nix); then 9 - nix run github:numtide/nixos-remote -- --stop-after-disko --store-paths "$(nix-build --no-out-link -I stockholm="$HOME"/sync/stockholm -I nixos-config="$HOME"/sync/stockholm/lass/1systems/"$SYSTEM"/physical.nix '<nixpkgs/nixos>' -A config.system.build.diskoNoDeps)" /dev/null "$TARGET" 10 - else 11 - disko=$(nix-build -I stockholm=$HOME/sync/stockholm -I secrets=$HOME/sync/stockholm/lass/2configs/tests/dummy-secrets -I nixos-config=$HOME/sync/stockholm/lass/1systems/$SYSTEM/physical.nix '<nixpkgs/nixos>' -A config.system.build.disko) 12 - NIX_SSHOPTS='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' nix-copy-closure --to "$TARGET" "$disko" 13 - sshn -t "$TARGET" -- "$disko" 14 - fi 15 - fi 16 - 17 - # install dependencies 18 - sshn "$TARGET" << SSH 19 - if ! type -p git; then 20 - nix-channel --update 21 - nix-env -iA nixos.git 22 - fi 23 - SSH 24 - 25 - # populate 26 - $(nix-build --no-out-link "$HOME"/sync/stockholm/lass/krops.nix -A populate --argstr name "$SYSTEM" --argstr target "$TARGET"/mnt/var/src --arg force true) 27 - 28 - # install 29 - sshn "$TARGET" << SSH 30 - NIXOS_CONFIG=/var/src/nixos-config nixos-install --no-root-password -I /mnt/var/src 31 - nixos-enter -- nixos-rebuild -I /var/src switch --install-bootloader 32 - umount -R /mnt 33 - zpool export -fa 34 - SSH 35 - ''
-28
5pkgs/knav/default.nix
··· 1 - { pkgs, ... }: 2 - let 3 - 4 - keynavrc = pkgs.writeText "keynavrc" '' 5 - clear 6 - Escape quit 7 - q record ~/.keynav_macros 8 - shift+at playback 9 - u history-back 10 - a cut-left 11 - s cut-down 12 - w cut-up 13 - d cut-right 14 - shift+a move-left 15 - shift+s move-down 16 - shift+w move-up 17 - shift+d move-right 18 - t windowzoom 19 - c cursorzoom 300 300 20 - e warp 21 - 1 click 1 22 - 2 click 2 23 - 3 click 3 24 - ''; 25 - in 26 - pkgs.writeScriptBin "knav" '' 27 - ${pkgs.keynav}/bin/keynav "loadconfig ${keynavrc}, start" 28 - ''
-19
5pkgs/mk_sql_pair/default.nix
··· 1 - { pkgs, ... }: 2 - 3 - pkgs.writeScriptBin "mk_sql_pair" '' 4 - #!/bin/sh 5 - 6 - name=$1 7 - password=$2 8 - 9 - if [ $# -ne 2 ]; then 10 - echo '$1=name, $2=password' 11 - exit 23; 12 - fi 13 - 14 - cat <<EOF 15 - create database $name; 16 - create user $name; 17 - grant all on $name.* to $name@'localhost' identified by '$password'; 18 - EOF 19 - ''
-40
5pkgs/mpv-poll/default.nix
··· 1 - { pkgs, ... }: 2 - 3 - pkgs.writeScriptBin "mpv-poll" '' 4 - #! ${pkgs.bash}/bin/bash 5 - 6 - pl=$1 7 - hist=''${HISTORY:-"./mpv_history"} 8 - mpv_options=''${MPV_OPTIONS:-""} 9 - 10 - lastYT="" 11 - 12 - play_video () { 13 - toPlay=$1 14 - echo $toPlay >> $hist 15 - mpv $mpv_options $toPlay 16 - } 17 - 18 - if ! [ -e $hist ]; then 19 - touch $hist 20 - fi 21 - 22 - while : 23 - do 24 - if [ -s $pl ]; then 25 - toPlay=$(head -1 $pl) 26 - sed -i '1d' $pl 27 - if $(echo $toPlay | grep -Eq 'https?://(www.)?youtube.com/watch'); then 28 - lastYT=$toPlay 29 - fi 30 - play_video $toPlay 31 - else 32 - if [ -n "$lastYT" ]; then 33 - next=$(yt-next $lastYT) 34 - lastYT=$next 35 - play_video $next 36 - fi 37 - sleep 1 38 - fi 39 - done 40 - ''
-23
5pkgs/neocon/package.nix
··· 1 - { 2 - stdenv, 3 - fetchFromGitHub, 4 - }: 5 - 6 - stdenv.mkDerivation (_finalAttrs: { 7 - pname = "neocon"; 8 - version = "unstable-2023-06-30"; 9 - 10 - src = fetchFromGitHub { 11 - owner = "sysprog21"; 12 - repo = "neocon"; 13 - rev = "879615f518b9aca23e8d148242d319c103620e0e"; 14 - hash = "sha256-X8yVdYhUKPnNV8RAXp9JIy5IZBnWB9fzpEV+QH0fND4="; 15 - }; 16 - 17 - doCheck = true; 18 - 19 - installPhase = '' 20 - mkdir -p $out/bin 21 - cp neocon $out/bin 22 - ''; 23 - })
-9
5pkgs/nix-index-update/default.nix
··· 1 - { pkgs }: 2 - pkgs.writers.writeDashBin "nix-index-update" '' 3 - set -efux 4 - filename="index-$(uname -m)-$(uname | tr A-Z a-z)" 5 - mkdir -p ~/.cache/nix-index && cd ~/.cache/nix-index 6 - # -N will only download a new version if there is an update. 7 - ${pkgs.wget}/bin/wget -q -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename 8 - ln -f $filename files 9 - ''
-41
5pkgs/review-mail-queue/default.nix
··· 1 - { pkgs }: 2 - let 3 - 4 - review = pkgs.writers.writeBash "review-mail" '' 5 - mail="$1" 6 - ${pkgs.exim}/bin/exim -Mvc "$mail" | grep -E 'Subject:|To:' 7 - ${pkgs.exim}/bin/exim -Mvl "$mail" 8 - while :; do 9 - read -p 'delete?' key 10 - case "$key" in 11 - v*) 12 - ${pkgs.exim}/bin/exim -Mvc "$mail" 13 - ;; 14 - d*) 15 - ${pkgs.exim}/bin/exim -Mrm "$mail" 16 - break 17 - ;; 18 - r*) 19 - ${pkgs.exim}/bin/exim -Mt "$mail" 20 - break 21 - ;; 22 - n*) 23 - break 24 - ;; 25 - esac 26 - done 27 - echo '-------------------' 28 - echo '-------------------' 29 - echo '-------------------' 30 - echo '-------------------' 31 - echo '-------------------' 32 - ''; 33 - 34 - in 35 - pkgs.writers.writeBashBin "review-mail" '' 36 - for mail in $(${pkgs.exim}/bin/exim -bp \ 37 - | ${pkgs.gnugrep}/bin/grep frozen \ 38 - | ${pkgs.gawk}/bin/awk '{print $3}'); do 39 - ${review} "$mail" 40 - done 41 - ''
-11
5pkgs/sshvnc/default.nix
··· 1 - { pkgs }: 2 - pkgs.writers.writeBashBin "sshvnc" '' 3 - set -xm 4 - 5 - RANDOM_HIGH_PORT=$(shuf -i 20000-65000 -n 1) 6 - ssh "$@" -f -L $RANDOM_HIGH_PORT:localhost:$RANDOM_HIGH_PORT -- x11vnc -noxdamage -noxfixes -noxrecord -display :0 -localhost -rfbport $RANDOM_HIGH_PORT 7 - 8 - sleep 3 9 - 10 - _JAVA_AWT_WM_NONREPARENTING=1 ${pkgs.turbovnc}/bin/vncviewer localhost:$RANDOM_HIGH_PORT 11 - ''
-117
5pkgs/unimenu/default.nix
··· 1 - { 2 - lib, 3 - runCommand, 4 - fetchurl, 5 - writeText, 6 - writers, 7 - coreutils, 8 - dmenu, 9 - gnused, 10 - libnotify, 11 - xclip, 12 - xdotool, 13 - }: 14 - let 15 - unicode-file = runCommand "unicode.txt" { } '' 16 - ${ 17 - writers.writePython3 "generate.py" 18 - { 19 - flakeIgnore = [ 20 - "E501" 21 - "E722" 22 - ]; 23 - } 24 - '' 25 - import csv 26 - 27 - with open("${ 28 - fetchurl { 29 - url = "https://unicode.org/Public/UCD/latest/ucd/UnicodeData.txt"; 30 - sha256 = "sha256-NgGOaGV/3LNIX2NmMP/oyFMuAcl3cD0oA/W4nWxf6vs="; 31 - } 32 - }", "r") as unicode_data: 33 - reader = csv.reader(unicode_data, delimiter=";") 34 - next(reader) # skip first row containing \0 35 - for row in reader: 36 - codepoint = row[0] 37 - name = row[1] 38 - alternate_name = row[10] 39 - try: 40 - print(chr(int(codepoint, 16)), codepoint, name, alternate_name, sep=" ") 41 - except: 42 - continue 43 - '' 44 - } > $out 45 - ''; 46 - kaomoji-file = writeText "kaomoji.txt" '' 47 - ¯\(°_o)/¯ dunno lol shrug dlol 48 - ¯\_(ツ)_/¯ dunno lol shrug dlol 49 - ( ͡° ͜ʖ ͡°) lenny 50 - ¯\_( ͡° ͜ʖ ͡°)_/¯ lenny shrug dlol 51 - ( ゚д゚) aaah sad noo 52 - ヽ(^o^)丿 hi yay hello 53 - (^o^: ups hehe 54 - (^∇^) yay 55 - ┗(`皿´)┛ angry argh 56 - ヾ(^_^) byebye!! bye 57 - <(^.^<) <(^.^)> (>^.^)> (7^.^)7 (>^.^<) dance 58 - (-.-)Zzz... sleep 59 - (∩╹□╹∩) oh noes woot 60 - (╯°□°)╯ ┻━┻ table flip 61 - (」゜ロ゜)」 why woot 62 - (_゜_゜_) gloom I see you 63 - ༼ ༎ຶ ෴ ༎ຶ༽ sad 64 - (\/) (°,,,,°) (\/) krebs 65 - ┳━┳ ヽ(ಠل͜ಠ)ノ putting table back 66 - ┻━┻︵ \(°□°)/ ︵ ┻━┻ flip all dem tablez 67 - (`・ω・´) bear look 68 - ᕦ(ຈل͜ຈ)ᕤ strong flex muscle bicep 69 - ᕦ(ò_óˇ)ᕤ strong flex muscle bicep 70 - (๑>ᴗ<๑) excite 71 - (∩ ` -´)⊃━━☆゚.*・。゚ wizard spell magic 72 - ╰( ͡° ͜ʖ ͡° )つ──☆*:・゚ wizard spell magic 73 - ◕ ◡ ◕ puss in boots big eye 74 - ≋≋≋≋≋̯̫⌧̯̫(ˆ•̮ ̮•ˆ) nyan cat 75 - ʕ•ᴥ•ʔ bear 76 - (ԾɷԾ) adventure time 77 - (⁀ᗢ⁀) happy yay 78 - (≧◡≦) happy yay 79 - \(º □ º )/ panic 80 - 𓂺 penis 81 - 𓂸 penis 82 - __〆( ̄ー ̄ ) write down 83 - __〆(º □ º) write down 84 - __〆(^_^) write down 85 - C= C= C= C= C=┌(;・ω・)┘ running fast here 86 - ▓▒░(°◡°)░▒▓ dont care 87 - (๑ᵔ⤙ᵔ๑) nom food eating 88 - (·•᷄ࡇ •᷅ ) ohoh sad 89 - ᕕ( ᐛ )ᕗ hehe lol letsgo 90 - (^_~) wink 91 - ''; 92 - in 93 - # ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode 94 - writers.writeDashBin "unimenu" '' 95 - history_file=$HOME/.cache/unimenu 96 - PATH=${ 97 - lib.makeBinPath [ 98 - coreutils 99 - dmenu 100 - gnused 101 - libnotify 102 - xclip 103 - xdotool 104 - ] 105 - } 106 - chosen=$(cat "$history_file" ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | tee --append "$history_file" | sed "s/ .*//") 107 - 108 - [ "$chosen" != "" ] || exit 109 - 110 - echo "$chosen" | tr -d '\n' | xclip -selection clipboard 111 - 112 - if [ -n "$1" ]; then 113 - xdotool key Shift+Insert 114 - else 115 - notify-send --app-name="$(basename "$0")" "'$chosen' copied to clipboard." & 116 - fi 117 - ''