diff options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/2configs/news.nix | 4 | ||||
-rw-r--r-- | krebs/2configs/reaktor2.nix | 6 | ||||
-rw-r--r-- | krebs/3modules/htgen.nix | 2 | ||||
-rw-r--r-- | krebs/5pkgs/simple/stable-generate/default.nix | 64 | ||||
-rw-r--r-- | krebs/nixpkgs-unstable.json | 8 | ||||
-rw-r--r-- | krebs/nixpkgs.json | 8 |
6 files changed, 29 insertions, 63 deletions
diff --git a/krebs/2configs/news.nix b/krebs/2configs/news.nix index 3649aeeea..d6c6371da 100644 --- a/krebs/2configs/news.nix +++ b/krebs/2configs/news.nix @@ -68,8 +68,8 @@ wantedBy = [ "multi-user.target" ]; }; - krebs.ergo.openFilesLimit = 16384; - krebs.ergo.config = { + services.ergochat.openFilesLimit = 16384; + services.ergochat.settings = { limits.nicklen = 100; limits.identlen = 100; history.enabled = false; diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 13b59fa82..e1e3b7670 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -64,8 +64,7 @@ let pkgs.curl pkgs.stable-generate ]} - stable_url=$(stable-generate "$@") - paste_url=$(curl -Ss "$stable_url" | + paste_url=$(stable-generate "$@" | curl -Ss http://p.r --data-binary @- | tail -1 ) @@ -87,8 +86,7 @@ let pkgs.stable-generate ]} case $_msgtarget in \#*) - stable_url=$(stable-generate "$@") - paste_url=$(curl -Ss "$stable_url" | + paste_url=$(stable-generate "$@" | curl -Ss https://p.krebsco.de --data-binary @- | tail -1 ) diff --git a/krebs/3modules/htgen.nix b/krebs/3modules/htgen.nix index 1e7e69927..b760ea671 100644 --- a/krebs/3modules/htgen.nix +++ b/krebs/3modules/htgen.nix @@ -41,7 +41,7 @@ let }; scriptFile = mkOption { - type = types.nullOr types.str; + type = types.nullOr (types.either types.package types.pathname); default = null; }; diff --git a/krebs/5pkgs/simple/stable-generate/default.nix b/krebs/5pkgs/simple/stable-generate/default.nix index fac261613..dc9c826f9 100644 --- a/krebs/5pkgs/simple/stable-generate/default.nix +++ b/krebs/5pkgs/simple/stable-generate/default.nix @@ -1,64 +1,32 @@ { pkgs, lib, ... }: -pkgs.writers.writeDashBin "stable-generate" '' +pkgs.writers.writeBashBin "stable-generate" '' set -efu export PATH=${lib.makeBinPath [ + pkgs.coreutils 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, # sampling steps - "Euler a", # sampling method - 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"}') + PAYLOAD=$(jq -cn --arg prompt "$*" '{ + prompt: $prompt + }') - data=$(curl -Ssf "$STABLE_URL/run/predict/" \ + filename=$(mktemp) + curl -Ssf "$STABLE_URL/sdapi/v1/txt2img" \ -X POST \ --Header 'Content-Type: application/json' \ - --data "$PAYLOAD" - ) - export data + --data "$PAYLOAD" | + jq -r '.images[0]' | + base64 --decode > "$filename" - filename=$(jq -rn 'env.data | fromjson.data[0][0].name') - - echo "$STABLE_URL/file=$filename" + if test -t 1; then + echo "$filename" + else + cat "$filename" + rm "$filename" + fi '' diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json index 897af6482..644192bbf 100644 --- a/krebs/nixpkgs-unstable.json +++ b/krebs/nixpkgs-unstable.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "14ddeaebcbe9a25748221d1d7ecdf98e20e2325e", - "date": "2022-12-04T12:18:32+01:00", - "path": "/nix/store/xnxll37bfls7a3g969avyvb2cic0g0f3-nixpkgs", - "sha256": "0bix6746zmifas85mkb49g0szkdza4ajzdfbix4cdan9ig06v6rc", + "rev": "64e0bf055f9d25928c31fb12924e59ff8ce71e60", + "date": "2022-12-11T09:33:23+00:00", + "path": "/nix/store/lmiwldi32kcc2qgm68swxgb3xzba0ayc-nixpkgs", + "sha256": "1hmx7hhjr74fqmxhb49yfyrpqhzwayrq48xwjv3a117czpb0gnjx", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index b6d46f1f9..fe44c172d 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "596a8e828c5dfa504f91918d0fa4152db3ab5502", - "date": "2022-11-30T14:03:12-05:00", - "path": "/nix/store/vax0irdsk8gvczikw219vj079mck6j6r-nixpkgs", - "sha256": "1n524a44p2kprk65zx2v6793kmxjpz1qm1ilxk82vq0vg0c5jy32", + "rev": "e8ec26f41fd94805d8fbf2552d8e7a449612c08e", + "date": "2022-12-09T22:31:53+00:00", + "path": "/nix/store/k2c06zy4vq019bb766rqnfszzx4q74zc-nixpkgs", + "sha256": "05jsnhb3a72m733qr7dvva71kark5268l77lrvmlylzwaqzq4yyx", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, |