diff options
Diffstat (limited to 'lass/5pkgs')
45 files changed, 0 insertions, 1527 deletions
diff --git a/lass/5pkgs/acronym/default.nix b/lass/5pkgs/acronym/default.nix deleted file mode 100644 index 8380b220a..000000000 --- a/lass/5pkgs/acronym/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, ... }: - -pkgs.writeScriptBin "acronym" '' - - #! ${pkgs.bash}/bin/bash - - acro=$1 - - curl -L -s http://www.acronymfinder.com/$acro.html \ - | grep 'class="result-list__body__rank"' \ - | sed ' - s/.*title="\([^"]*\)".*/\1/ - s/^.* - // - s/'/'\'''/g - ' -'' diff --git a/lass/5pkgs/autowifi b/lass/5pkgs/autowifi deleted file mode 160000 -Subproject cf3ae8f6fe285eab67db4f36f9a3da3762c3531 diff --git a/lass/5pkgs/bank/default.nix b/lass/5pkgs/bank/default.nix deleted file mode 100644 index 9f3a44d79..000000000 --- a/lass/5pkgs/bank/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ writeDashBin, coreutils, pass, hledger, diffutils }: - -writeDashBin "bank" '' - tmp=$(mktemp) - ${pass}/bin/pass show hledger > $tmp - ${hledger}/bin/hledger --file=$tmp "$@" - ${pass}/bin/pass show hledger | if ${diffutils}/bin/diff $tmp -; then - exit 0 - else - ${coreutils}/bin/cat $tmp | ${pass}/bin/pass insert -m hledger - fi - ${coreutils}/bin/rm $tmp -'' - diff --git a/lass/5pkgs/default.nix b/lass/5pkgs/default.nix deleted file mode 100644 index 6fa93e146..000000000 --- a/lass/5pkgs/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -self: super: let - lib = super.lib; - - # This callPackage will try to detect obsolete overrides. - callPackage = path: args: let - override = super.callPackage path args; - upstream = lib.optionalAttrs (override ? "name") - (super.${(builtins.parseDrvName override.name).name} or {}); - in if upstream ? "name" && - override ? "name" && - builtins.compareVersions upstream.name override.name != -1 - then - builtins.trace - "Upstream `${upstream.name}' gets overridden by `${override.name}'." - override - else override; - - subdirsOf = path: - lib.mapAttrs (name: _: path + "/${name}") - (lib.filterAttrs (_: x: x == "directory") (builtins.readDir path)); - -in lib.mapAttrs (_: lib.flip callPackage {}) - (lib.filterAttrs (_: dir: lib.pathExists (dir + "/default.nix")) - (subdirsOf ./.)) diff --git a/lass/5pkgs/deploy/default.nix b/lass/5pkgs/deploy/default.nix deleted file mode 100644 index a3fe4dca3..000000000 --- a/lass/5pkgs/deploy/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ writers }: -writers.writeDashBin "deploy" '' - set -xeu - export SYSTEM="$1" - $(nix-build $HOME/sync/stockholm/lass/krops.nix --no-out-link --argstr name "$SYSTEM" -A deploy) -'' diff --git a/lass/5pkgs/dl/default.nix b/lass/5pkgs/dl/default.nix deleted file mode 100644 index 69f2b8c45..000000000 --- a/lass/5pkgs/dl/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ pkgs }: -pkgs.writers.writeBashBin "dl" '' - set -efux - LINK_OR_SEARCH=$@ - if [[ $LINK_OR_SEARCH == magnet:?* ]] || [[ $LINK_OR_SEARCH =~ ^https?: ]]; then - LINK=$LINK_OR_SEARCH - else - SEARCH=$LINK_OR_SEARCH - fi - - if ! [ -z ''${SEARCH+x} ]; then - LINK=$(${pkgs.we-get}/bin/we-get -n 50 -t the_pirate_bay,1337x --json -s "$SEARCH" | - ${pkgs.jq}/bin/jq -r 'to_entries | - .[] | - "\(.key) [\(.value.seeds)]\t\(.value.link)" - ' | - ${pkgs.fzf}/bin/fzf -d '\t' --with-nth=1 | - ${pkgs.coreutils}/bin/cut -f 2 - ) - fi - - if [ -z ''${CATEGORY+x} ]; then - CATEGORY=$(echo -e 'movies\nseries' | ${pkgs.fzf}/bin/fzf) - fi - - ${pkgs.transmission}/bin/transmission-remote yellow.r \ - -w /var/download/finished/sorted/"$CATEGORY" \ - -a "$LINK" -'' diff --git a/lass/5pkgs/dls/default.nix b/lass/5pkgs/dls/default.nix deleted file mode 100644 index 36cdb620b..000000000 --- a/lass/5pkgs/dls/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs }: -pkgs.writers.writeDashBin "dls" '' - set -efux - SESSION_ID=$( - curl -Ss -d '{}' http://yellow.r:9091/transmission/rpc -v -o /dev/null 2>&1 | - grep -oP '(?<=X-Transmission-Session-Id: )\w+' - ) - ${pkgs.curl}/bin/curl -Ss \ - http://yellow.r:9091/transmission/rpc \ - -H "X-Transmission-Session-Id: $SESSION_ID" \ - -d '{"arguments":{"fields":["errorString","eta","isFinished","name","sizeWhenDone","status"]},"method":"torrent-get","tag":4}' | - jq . -'' diff --git a/lass/5pkgs/drbd9/default.nix b/lass/5pkgs/drbd9/default.nix deleted file mode 100644 index 34ef0f564..000000000 --- a/lass/5pkgs/drbd9/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ lib, stdenv, git, fetchzip, fetchFromGitHub, kernel }: let - - version = "9.1.7"; - -in stdenv.mkDerivation { - pname = "drbd"; - version = "${kernel.version}-${version}"; - - src = fetchzip { - url = "https://pkg.linbit.com//downloads/drbd/9/drbd-9.1.7.tar.gz"; - sha256 = "sha256-JsbtOrqhZkG7tFEc6tDmj3RlxZggl0HOKfCI8lYtQok="; - }; - # src = fetchFromGitHub { - # owner = "LINBIT"; - # repo = "drbd"; - # rev = "drbd-${version}"; - # sha256 = "sha256-8HAt+k0yi6XsZZ9mkVCQkv2pn65o3Zsa0KwTSBJh0yY="; - # leaveDotGit = true; - # }; - - nativeBuildInputs = [ git ] ++ kernel.moduleBuildDependencies; - - # hardeningDisable = [ "pic" ]; - - makeFlags = kernel.makeFlags ++ [ - "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - ]; - - installPhase = '' - install -D drbd/drbd.ko -t "$out/lib/modules/${kernel.modDirVersion}/updates/" - install -D drbd/drbd_transport_tcp.ko -t "$out/lib/modules/${kernel.modDirVersion}/updates/" - ''; - - enableParallelBuilding = true; -} diff --git a/lass/5pkgs/emot-menu/default.nix b/lass/5pkgs/emot-menu/default.nix deleted file mode 100644 index 3ce635dac..000000000 --- a/lass/5pkgs/emot-menu/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ coreutils, dmenu, gnused, writeDashBin, writeText, xdotool }: let - - emoticons = writeText "emoticons" '' -¯\(°_o)/¯ | dunno lol shrug dlol -¯\_(ツ)_/¯ | dunno lol shrug dlol -( ͡° ͜ʖ ͡°) | lenny -¯\_( ͡° ͜ʖ ͡°)_/¯ | lenny shrug dlol -( ゚д゚) | aaah sad noo -ヽ(^o^)丿 | hi yay hello -(^o^; | ups hehe -(^∇^) | yay -┗(`皿´)┛ | angry argh -ヾ(^_^) byebye!! | bye -<(^.^<) <(^.^)> (>^.^)> (7^.^)7 (>^.^<) | dance -(-.-)Zzz... | sleep -(∩╹□╹∩) | oh noes woot -™ | tm -ζ | zeta -(╯°□°)╯ ┻━┻ | table flip -(」゜ロ゜)」 | why woot -(_゜_゜_) | gloom I see you -༼ ༎ຶ ෴ ༎ຶ༽ | sad -(\/) (°,,,,°) (\/) | krebs - ''; - -in -writeDashBin "emoticons" '' - set -efu - - data=$(${coreutils}/bin/cat ${emoticons}) - emoticon=$(echo "$data" | ${dmenu}/bin/dmenu | ${gnused}/bin/sed 's/ | .*//') - ${xdotool}/bin/xdotool type --clearmodifiers -- "$emoticon" - exit 0 -'' diff --git a/lass/5pkgs/firefoxPlugins/noscript.nix b/lass/5pkgs/firefoxPlugins/noscript.nix deleted file mode 100644 index 67a00a1b2..000000000 --- a/lass/5pkgs/firefoxPlugins/noscript.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ fetchgit, stdenv, bash, zip }: - -stdenv.mkDerivation rec { - name = "noscript"; - id = "{73a6fe31-595d-460b-a920-fcc0f8843232}"; - - src = fetchgit { - url = "https://github.com/avian2/noscript"; - rev = "c900a079793868bb080ab1e23522d29dc121b4c6"; - sha256 = "1y06gh5a622yrsx0h7v92qnvdi97i54ln09zc1lvk8x430z5bdly"; - }; - - buildInputs = [ zip ]; - - patchPhase = '' - substituteInPlace "version.sh" \ - --replace "/bin/bash" "${bash}/bin/bash" - ''; - - buildPhase = '' - ./makexpi.sh - ''; - - installPhase = '' - mkdir -p $out/ - cp *.xpi $out/${id}.xpi - ''; -} diff --git a/lass/5pkgs/firefoxPlugins/ublock.nix b/lass/5pkgs/firefoxPlugins/ublock.nix deleted file mode 100644 index 29ef250e8..000000000 --- a/lass/5pkgs/firefoxPlugins/ublock.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ fetchgit, stdenv, bash, python, zip }: - -stdenv.mkDerivation rec { - name = "ublock"; - id = "{2b10c1c8-a11f-4bad-fe9c-1c11e82cac42}"; - - src = fetchgit { - url = "https://github.com/chrisaljoudi/uBlock"; - rev = "a70a50052a7914cbf86d46a725812b98434d8c70"; - sha256 = "1qfzy79f8x01i33x0m95k833z1jgxjwb8wvlr6fj6id1kxfvzh77"; - }; - - buildInputs = [ - zip - python - ]; - - patchPhase = '' - substituteInPlace "tools/make-firefox.sh" \ - --replace "/bin/bash" "${bash}/bin/bash" - ''; - - buildPhase = '' - tools/make-firefox.sh all - ''; - - installPhase = '' - mkdir -p $out/ - cp dist/build/uBlock.firefox.xpi $out/${id}.xpi - ''; -} diff --git a/lass/5pkgs/firefoxPlugins/vimperator.nix b/lass/5pkgs/firefoxPlugins/vimperator.nix deleted file mode 100644 index dabef3d20..000000000 --- a/lass/5pkgs/firefoxPlugins/vimperator.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ fetchgit, stdenv, zip }: - -stdenv.mkDerivation rec { - name = "vimperator"; - id = "vimperator@mozdev.org"; - - src = fetchgit { - url = "https://github.com/vimperator/vimperator-labs.git"; - rev = "ba7d8e72516fdc22246748c8183d7bc90f6fb073"; - sha256 = "0drz67qm5hxxzw699rswlpjkg4p2lfipx119pk1nyixrqblcsvq2"; - }; - - buildInputs = [ zip ]; - - installPhase = '' - mkdir -p $out/ - cp downloads/vimperator*.xpi $out/${id}.xpi - ''; -} diff --git a/lass/5pkgs/graphml2json/default.nix b/lass/5pkgs/graphml2json/default.nix deleted file mode 100644 index 6f06ded3d..000000000 --- a/lass/5pkgs/graphml2json/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: -pkgs.writers.writePython3Bin "graphml2json" { libraries = [ pkgs.python3Packages.networkx ]; } '' - import networkx as nx - import json - import sys - - - G = nx.read_graphml(sys.argv[1]) - data = nx.readwrite.json_graph.node_link_data(G) - - print(json.dumps(data, indent=2)) -'' diff --git a/lass/5pkgs/htmlparser/default.nix b/lass/5pkgs/htmlparser/default.nix deleted file mode 100644 index 72bd3f437..000000000 --- a/lass/5pkgs/htmlparser/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, buildGoModule, fetchFromGitHub }: - -buildGoModule rec { - pname = "htmlparser"; - version = "v1.0.0"; - - src = fetchFromGitHub { - owner = "htmlparser"; - repo = "htmlparser"; - rev = "02f964ebd24c296dcfa56c357bb8dedde0f39757"; - sha256 = "1k19rdpjf5sdyjfl233y6bsfgkcnv799ivrh2vkw22almg4243ar"; - }; - - vendorSha256 = "0qkd587z4n372y4lqyzjqc1qlsi3525ah99vdm5dqq4jidcd5h7w"; -} diff --git a/lass/5pkgs/init/default.nix b/lass/5pkgs/init/default.nix deleted file mode 100644 index ee49951b1..000000000 --- a/lass/5pkgs/init/default.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ pkgs, lib, vgname ? "vgname", luksmap ? "luksmap", ... }: - -with lib; - -pkgs.writeScriptBin "init" '' - #!/usr/bin/env nix-shell - #! nix-shell -i bash -p cryptsetup gptfdisk jq libxfs - set -xefuo pipefail - - disk=$1 - - if mount | grep -q "$disk"; then - echo "target device is already mounted, bailout" - exit 2 - fi - - bootdev="$disk"2 - luksdev="$disk"3 - luksmap=/dev/mapper/${luksmap} - - vgname=${vgname} - - - rootdev=/dev/mapper/${vgname}-root - homedev=/dev/mapper/${vgname}-home - - read -p "LUKS Password: " lukspw - - # - # partitioning - # - - # http://en.wikipedia.org/wiki/GUID_Partition_Table - # undo: - # dd if=/dev/zero bs=512 count=34 of=/dev/sda - # TODO zero last 34 blocks (lsblk -bno SIZE /dev/sda) - if ! test "$(blkid -o value -s PTTYPE "$disk")" = gpt; then - sgdisk -og "$disk" - sgdisk -n 1:2048:4095 -c 1:"BIOS Boot Partition" -t 1:ef02 "$disk" - sgdisk -n 2:4096:+1G -c 2:"EFI System Partition" -t 2:ef00 "$disk" - sgdisk -n 3:0:0 -c 3:"LUKS container" -t 3:8300 "$disk" - fi - - if ! test "$(blkid -o value -s PARTLABEL "$luksdev")" = "LUKS container"; then - echo zonk2 - exit 23 - fi - - if ! cryptsetup isLuks "$luksdev"; then - # aes xts-plain64 - echo -n "$lukspw" | cryptsetup luksFormat "$luksdev" - \ - -h sha512 \ - --iter-time 5000 - fi - - if ! test -e "$luksmap"; then - echo "$lukspw" | cryptsetup luksOpen "$luksdev" "$(basename "$luksmap")" - - fi - - if ! test "$(blkid -o value -s TYPE "$luksmap")" = LVM2_member; then - pvcreate "$luksmap" - fi - - if ! vgdisplay -s "$vgname"; then vgcreate "$vgname" "$luksmap"; fi - - lvchange -a y /dev/mapper/"$vgname" - - if ! test -e "$rootdev"; then lvcreate -L 3G -n root "$vgname"; fi - - # - # formatting - # - - if ! test "$(blkid -o value -s TYPE "$bootdev")" = vfat; then - mkfs.vfat "$bootdev" - fi - - if ! test "$(blkid -o value -s TYPE "$rootdev")" = xfs; then - mkfs.xfs "$rootdev" - fi - - if ! test "$(lsblk -n -o MOUNTPOINT "$rootdev")" = /mnt; then - mkdir -p /mnt - mount "$rootdev" /mnt - fi - if ! test "$(lsblk -n -o MOUNTPOINT "$bootdev")" = /mnt/boot; then - mkdir -m 0000 -p /mnt/boot - mount "$bootdev" /mnt/boot - fi - - # - # dependencies for stockholm - # - - # TODO: get sentinal file from target_path - mkdir -p /mnt/var/src - touch /mnt/var/src/.populate - - # - # print all the infos - # - - gdisk -l "$disk" - lsblk "$disk" - - echo READY. -'' diff --git a/lass/5pkgs/init/run-vm.sh b/lass/5pkgs/init/run-vm.sh deleted file mode 100755 index 13914ad5f..000000000 --- a/lass/5pkgs/init/run-vm.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i bash -p nixos-generators - -set -efu - -WD=$(dirname "$0") -nixos-generate -I stockholm="$WD"/../../.. -c "$WD"/config.nix -f vm-nogui --run diff --git a/lass/5pkgs/init/test.nix b/lass/5pkgs/init/test.nix deleted file mode 100644 index e76e7e009..000000000 --- a/lass/5pkgs/init/test.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - virtualisation.emptyDiskImages = [ - 8000 - ]; - virtualisation.memorySize = 1500; - boot.tmpOnTmpfs = true; - - environment.systemPackages = [ - (pkgs.callPackage ./default.nix {}) - ]; - services.mingetty.autologinUser = lib.mkForce "root"; -} diff --git a/lass/5pkgs/init/test.sh b/lass/5pkgs/init/test.sh deleted file mode 100755 index 0ceaa73ca..000000000 --- a/lass/5pkgs/init/test.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i bash -p nixos-generators - -set -xefu - -WD=$(realpath $(dirname "$0")) -TMPDIR=$(mktemp -d) -cd "$TMPDIR" -nixos-generate -c "$WD"/test.nix -f vm-nogui --run "$@" -cd - -rm -r "$TMPDIR" diff --git a/lass/5pkgs/install-system/default.nix b/lass/5pkgs/install-system/default.nix deleted file mode 100644 index 0e13265f6..000000000 --- a/lass/5pkgs/install-system/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ pkgs }: -pkgs.writers.writeDashBin "install-system" '' - set -efux - SYSTEM=$1 - TARGET=$2 - # format - if ! (sshn "$TARGET" -- mountpoint /mnt); then - if ! (sshn "$TARGET" -- type -p nix); then - 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" - else - 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) - NIX_SSHOPTS='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' nix-copy-closure --to "$TARGET" "$disko" - sshn -t "$TARGET" -- "$disko" - fi - fi - - # install dependencies - sshn "$TARGET" << SSH - if ! type -p git; then - nix-channel --update - nix-env -iA nixos.git - fi - SSH - - # populate - $(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) - - # install - sshn "$TARGET" << SSH - NIXOS_CONFIG=/var/src/nixos-config nixos-install --no-root-password -I /mnt/var/src - nixos-enter -- nixos-rebuild -I /var/src switch --install-bootloader - umount -R /mnt - zpool export -fa - SSH -'' diff --git a/lass/5pkgs/knav/default.nix b/lass/5pkgs/knav/default.nix deleted file mode 100644 index 30d49a1b3..000000000 --- a/lass/5pkgs/knav/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ pkgs, ... }: let - - keynavrc = pkgs.writeText "keynavrc" '' - clear - Escape quit - q record ~/.keynav_macros - shift+at playback - u history-back - a cut-left - s cut-down - w cut-up - d cut-right - shift+a move-left - shift+s move-down - shift+w move-up - shift+d move-right - t windowzoom - c cursorzoom 300 300 - e warp - 1 click 1 - 2 click 2 - 3 click 3 - ''; -in pkgs.writeScriptBin "knav" '' - ${pkgs.keynav}/bin/keynav "loadconfig ${keynavrc}, start" -'' diff --git a/lass/5pkgs/l-gen-secrets/default.nix b/lass/5pkgs/l-gen-secrets/default.nix deleted file mode 100644 index 27e59bb96..000000000 --- a/lass/5pkgs/l-gen-secrets/default.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ pkgs }: -pkgs.writers.writeDashBin "l-gen-secrets" '' - set -efu - HOSTNAME=$1 - TMPDIR=$(${pkgs.coreutils}/bin/mktemp -d) - if [ "''${DRYRUN-n}" = "n" ]; then - trap 'rm -rf $TMPDIR' EXIT - else - echo "$TMPDIR" - set -x - fi - mkdir -p $TMPDIR/out - - PASSWORD=$(${pkgs.pwgen}/bin/pwgen 25 1) - HASHED_PASSWORD=$(echo $PASSWORD | ${pkgs.hashPassword}/bin/hashPassword -s) > /dev/null - - # ssh - ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -f $TMPDIR/ssh.id_ed25519 -P "" -C "" >/dev/null - ${pkgs.coreutils}/bin/mv $TMPDIR/ssh.id_ed25519 $TMPDIR/out/ - - # tor - ${pkgs.coreutils}/bin/timeout 1 ${pkgs.tor}/bin/tor --HiddenServiceDir $TMPDIR/tor --HiddenServicePort 1 --SocksPort 0 >/dev/null || : - ${pkgs.coreutils}/bin/mv $TMPDIR/tor/hs_ed25519_secret_key $TMPDIR/out/ssh-tor.priv - - # tinc - ${pkgs.coreutils}/bin/mkdir -p $TMPDIR/tinc - ${pkgs.tinc_pre}/bin/tinc --config $TMPDIR/tinc generate-keys 4096 </dev/null - ${pkgs.coreutils}/bin/mv $TMPDIR/tinc/ed25519_key.priv $TMPDIR/out/retiolum.ed25519_key.priv - ${pkgs.coreutils}/bin/mv $TMPDIR/tinc/rsa_key.priv $TMPDIR/out/retiolum.rsa_key.priv - - # wireguard - ${pkgs.wireguard-tools}/bin/wg genkey > $TMPDIR/out/wiregrill.key - ${pkgs.coreutils}/bin/cat $TMPDIR/out/wiregrill.key | ${pkgs.wireguard-tools}/bin/wg pubkey > $TMPDIR/wiregrill.pub - - # system passwords - cat <<EOF > $TMPDIR/out/hashedPasswords.nix - { - root = "$HASHED_PASSWORD"; - mainUser = "$HASHED_PASSWORD"; - } - EOF - - set +f - if [ "''${DRYRUN-n}" = "n" ]; then - cd $TMPDIR/out - for x in *; do - ${pkgs.coreutils}/bin/cat $x | ${pkgs.pass}/bin/pass insert -m hosts/$HOSTNAME/$x > /dev/null - done - echo $PASSWORD | ${pkgs.pass}/bin/pass insert -m admin/$HOSTNAME/pass > /dev/null - ${pkgs.coreutils}/bin/cat $TMPDIR/tor/hostname | ${pkgs.pass}/bin/pass insert -m admin/$HOSTNAME/torname > /dev/null - fi - set -f - - cat <<EOF - { r6, w6, ... }: - { - nets = { - retiolum = { - ip4.addr = "10.243.0.changeme"; - ip6.addr = r6 "changeme"; - aliases = [ - "$HOSTNAME.r" - ]; - tinc.pubkey = ${"''"} - $(cat $TMPDIR/tinc/rsa_key.pub | sed 's/^/ /') - ${"''"}; - tinc.pubkey_ed25519 = "$(cat $TMPDIR/tinc/ed25519_key.pub | ${pkgs.gnused}/bin/sed 's/.* = //')"; - }; - wiregrill = { - ip6.addr = w6 "changeme"; - aliases = [ - "$HOSTNAME.w" - ]; - wireguard.pubkey = ${"''"} - $(cat $TMPDIR/wiregrill.pub) - ${"''"}; - }; - }; - ssh.pubkey = "$(cat $TMPDIR/ssh.id_ed25519.pub)"; - } - EOF -'' diff --git a/lass/5pkgs/logify/default.nix b/lass/5pkgs/logify/default.nix deleted file mode 100644 index bca7e7971..000000000 --- a/lass/5pkgs/logify/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ curl, writeDashBin }: - -#usage: ping 8.8.8.8 |& logify -I -writeDashBin "logify" '' - date_args=''${@:--Is} - while read line; do echo $(date "$date_args") $line; done -'' diff --git a/lass/5pkgs/mk_sql_pair/default.nix b/lass/5pkgs/mk_sql_pair/default.nix deleted file mode 100644 index 738a8daf6..000000000 --- a/lass/5pkgs/mk_sql_pair/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ pkgs, ... }: - -pkgs.writeScriptBin "mk_sql_pair" '' - #!/bin/sh - - name=$1 - password=$2 - - if [ $# -ne 2 ]; then - echo '$1=name, $2=password' - exit 23; - fi - - cat <<EOF - create database $name; - create user $name; - grant all on $name.* to $name@'localhost' identified by '$password'; - EOF -'' diff --git a/lass/5pkgs/mpv-poll/default.nix b/lass/5pkgs/mpv-poll/default.nix deleted file mode 100644 index ee191843e..000000000 --- a/lass/5pkgs/mpv-poll/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ pkgs, ... }: - -pkgs.writeScriptBin "mpv-poll" '' - #! ${pkgs.bash}/bin/bash - - pl=$1 - hist=''${HISTORY:-"./mpv_history"} - mpv_options=''${MPV_OPTIONS:-""} - - lastYT="" - - play_video () { - toPlay=$1 - echo $toPlay >> $hist - mpv $mpv_options $toPlay - } - - if ! [ -e $hist ]; then - touch $hist |