From 548fb5b41cd07c464ec7dc1ca5ab262b7f22b2d1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 18 Nov 2022 14:29:42 +0100 Subject: pkgs.ergo: use upstream --- krebs/5pkgs/simple/ergo/default.nix | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 krebs/5pkgs/simple/ergo/default.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/ergo/default.nix b/krebs/5pkgs/simple/ergo/default.nix deleted file mode 100644 index 2c9223eed..000000000 --- a/krebs/5pkgs/simple/ergo/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ buildGo117Module , fetchFromGitHub, lib }: - -buildGo117Module rec { - pname = "ergo"; - version = "2.9.1"; - - src = fetchFromGitHub { - owner = "ergochat"; - repo = "ergo"; - rev = "v${version}"; - sha256 = "sha256-RxsmkTfHymferS/FRW0sLnstKfvGXkW6cEb/JbeS4lc="; - }; - - vendorSha256 = null; - - meta = { - description = "A modern IRC server (daemon/ircd) written in Go"; - homepage = "https://github.com/ergochat/ergo"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ lassulus tv ]; - platforms = lib.platforms.linux; - }; -} -- cgit v1.2.3 From 6db1863a27857f92303322c3502505d541b6241f Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 21 Nov 2022 14:28:25 +0100 Subject: init pkgs.stable-generate --- krebs/5pkgs/simple/stable-generate/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 krebs/5pkgs/simple/stable-generate/default.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/stable-generate/default.nix b/krebs/5pkgs/simple/stable-generate/default.nix new file mode 100644 index 000000000..495007397 --- /dev/null +++ b/krebs/5pkgs/simple/stable-generate/default.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +pkgs.writers.writeDashBin "stable-generate" '' + set -efu + + STABLE_URL=''${STABLE_URL:-http://stable-confusion.r} + + PAYLOAD=$(jq -cn --arg query "$*" '{fn_index: 51, data: [$query,"","None","None",20,"Euler a",false,false,1,1,7,-1,-1,0,0,0,false,512,512,false,0.7,0,0,"None","",false,false,false,"","Seed","","Nothing","",true,false,false,null,"",""], session_hash: "hello_this_is_dog"}') + + data=$(curl -Ssf "$STABLE_URL/run/predict/" \ + -X POST \ + --Header 'Content-Type: application/json' \ + --data "$PAYLOAD" + ) + export data + + filename=$(jq -rn 'env.data | fromjson.data[0][0].name') + + echo "$STABLE_URL/file=$filename" +'' -- cgit v1.2.3 From b2f8ffb920466663f6b48b1cefcbf336b700bff4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 21 Nov 2022 15:07:31 +0100 Subject: stable-generate: set PATH --- krebs/5pkgs/simple/stable-generate/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/stable-generate/default.nix b/krebs/5pkgs/simple/stable-generate/default.nix index 495007397..23e4cfc8e 100644 --- a/krebs/5pkgs/simple/stable-generate/default.nix +++ b/krebs/5pkgs/simple/stable-generate/default.nix @@ -1,8 +1,13 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: pkgs.writers.writeDashBin "stable-generate" '' set -efu + export PATH=${lib.makeBinPath [ + pkgs.curl + pkgs.jq + ]} + STABLE_URL=''${STABLE_URL:-http://stable-confusion.r} PAYLOAD=$(jq -cn --arg query "$*" '{fn_index: 51, data: [$query,"","None","None",20,"Euler a",false,false,1,1,7,-1,-1,0,0,0,false,512,512,false,0.7,0,0,"None","",false,false,false,"","Seed","","Nothing","",true,false,false,null,"",""], session_hash: "hello_this_is_dog"}') -- cgit v1.2.3 From 8c65e4061ab0bae2a8b921b3939c6a1917583e3b Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 21 Nov 2022 23:58:35 +0100 Subject: hashPassword: use nixpkgs writers --- krebs/5pkgs/simple/hashPassword/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/hashPassword/default.nix b/krebs/5pkgs/simple/hashPassword/default.nix index 3c604be80..8d3ba2525 100644 --- a/krebs/5pkgs/simple/hashPassword/default.nix +++ b/krebs/5pkgs/simple/hashPassword/default.nix @@ -1,6 +1,6 @@ { lib, pkgs, ... }: -pkgs.writeDashBin "hashPassword" '' +pkgs.writers.writeDashBin "hashPassword" '' # usage: hashPassword [...] set -euf -- cgit v1.2.3 From 43e65c94a13d276798d15c1fc97a69467dd67820 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Nov 2022 00:01:41 +0100 Subject: weechat-declarative: use correct _file --- krebs/5pkgs/simple/weechat-declarative/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/weechat-declarative/default.nix b/krebs/5pkgs/simple/weechat-declarative/default.nix index 5f9c8635b..7b057d41b 100644 --- a/krebs/5pkgs/simple/weechat-declarative/default.nix +++ b/krebs/5pkgs/simple/weechat-declarative/default.nix @@ -33,7 +33,7 @@ let eval = lib.evalModules { modules = lib.singleton { - _file = toString ./weechat-declarative.nix; + _file = toString ./default.nix; imports = lib.singleton config; options = { scripts = lib.mkOption { -- cgit v1.2.3 From 336caf2832d97892bd27a90881121740d57b3906 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Nov 2022 00:02:32 +0100 Subject: weechat-declarative: copy writable file into $CONFDIR --- krebs/5pkgs/simple/weechat-declarative/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/weechat-declarative/default.nix b/krebs/5pkgs/simple/weechat-declarative/default.nix index 7b057d41b..93c73761c 100644 --- a/krebs/5pkgs/simple/weechat-declarative/default.nix +++ b/krebs/5pkgs/simple/weechat-declarative/default.nix @@ -148,7 +148,8 @@ let ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: target: /* sh */ '' - ${pkgs.coreutils}/bin/ln -s ${lib.escapeShellArg target} "$CONFDIR"/${lib.escapeShellArg name} + ${pkgs.coreutils}/bin/cp ${lib.escapeShellArg target} "$CONFDIR"/${lib.escapeShellArg name} + ${pkgs.coreutils}/bin/chmod +w "$CONFDIR"/${lib.escapeShellArg name} '') cfg.files ) -- cgit v1.2.3 From a55d6f4b7f91d46fccddbabc7d8b4aad3bcd4029 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Nov 2022 00:02:53 +0100 Subject: remove broken nix-prefetch-github --- krebs/5pkgs/simple/nix-prefetch-github.nix | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 krebs/5pkgs/simple/nix-prefetch-github.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/nix-prefetch-github.nix b/krebs/5pkgs/simple/nix-prefetch-github.nix deleted file mode 100644 index 14096c33f..000000000 --- a/krebs/5pkgs/simple/nix-prefetch-github.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ curl, jq, nix, writeDashBin }: - -writeDashBin "nix-prefetch-github" '' - # usage: nix-prefetch-github OWNER REPO [REF] - set -efu - - owner=$1 - repo=$2 - ref=''${3-master} - - info_url=https://api.github.com/repos/$owner/$repo/commits/$ref - info=$(${curl}/bin/curl -fsS "$info_url") - rev=$(printf %s "$info" | ${jq}/bin/jq -r .sha) - - name=$owner-$repo-$ref - url=https://github.com/$owner/$repo/tarball/$rev - sha256=$(${nix}/bin/nix-prefetch-url --name "$name" --unpack "$url") - - export owner repo rev sha256 - ${jq}/bin/jq -n ' - env | { - owner, repo, rev, sha256 - } - ' -'' -- cgit v1.2.3 From 618185c6f8936a6f70509be554704418e8471477 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Nov 2022 10:44:06 +0100 Subject: stable-generate: activate repair faces --- krebs/5pkgs/simple/stable-generate/default.nix | 41 +++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/stable-generate/default.nix b/krebs/5pkgs/simple/stable-generate/default.nix index 23e4cfc8e..c30fa2cfa 100644 --- a/krebs/5pkgs/simple/stable-generate/default.nix +++ b/krebs/5pkgs/simple/stable-generate/default.nix @@ -10,7 +10,46 @@ pkgs.writers.writeDashBin "stable-generate" '' STABLE_URL=''${STABLE_URL:-http://stable-confusion.r} - PAYLOAD=$(jq -cn --arg query "$*" '{fn_index: 51, data: [$query,"","None","None",20,"Euler a",false,false,1,1,7,-1,-1,0,0,0,false,512,512,false,0.7,0,0,"None","",false,false,false,"","Seed","","Nothing","",true,false,false,null,"",""], session_hash: "hello_this_is_dog"}') + PAYLOAD=$(jq -cn --arg query "$*" '{fn_index: 51, data: [ + $query, + "", + "None", + "None", + 20, + "Euler a", + false, # restore faces + false, + 1, + 1, + 7, + -1, + -1, + 0, + 0, + 0, + false, + 512, #probably resolution + 512, #probably resolution + false, + 0.7, + 0, + 0, + "None", + "", + false, + false, + false, + "", + "Seed", + "", + "Nothing", + "", + true, + false, + false, + null, + "", + ""], session_hash: "hello_this_is_dog"}') data=$(curl -Ssf "$STABLE_URL/run/predict/" \ -X POST \ -- cgit v1.2.3 From fef385511d07c1ea5be1eae4fd8dd7eba563ab2c Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Nov 2022 10:47:32 +0100 Subject: stable-generate: add more comments --- krebs/5pkgs/simple/stable-generate/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/stable-generate/default.nix b/krebs/5pkgs/simple/stable-generate/default.nix index c30fa2cfa..fac261613 100644 --- a/krebs/5pkgs/simple/stable-generate/default.nix +++ b/krebs/5pkgs/simple/stable-generate/default.nix @@ -15,8 +15,8 @@ pkgs.writers.writeDashBin "stable-generate" '' "", "None", "None", - 20, - "Euler a", + 20, # sampling steps + "Euler a", # sampling method false, # restore faces false, 1, -- cgit v1.2.3