provide stable diffusion model

This commit is contained in:
Ingolf Wagner 2022-09-15 22:24:43 +02:00
parent 2c9163001f
commit 96d584f481
Signed by: palo
GPG key ID: 76BF5F1928B9618B
2 changed files with 21 additions and 5 deletions

View file

@ -793,11 +793,11 @@
"private_assets": {
"flake": false,
"locked": {
"lastModified": 1655934754,
"narHash": "sha256-XLAsp/YoRJbgK4U+SavIQsrhbIRWRrGs3E5IuKMXMLs=",
"lastModified": 1663253057,
"narHash": "sha256-uj5eO4c8v1ybm7pp0SXswFTmGqdTgf1Il3UEiFrEymw=",
"ref": "main",
"rev": "a4df343e4fbc250a3e51ddbe732c8dd7e44887da",
"revCount": 1,
"rev": "c9457b3bb7edd04f1a51ade9868692ee1902d511",
"revCount": 2,
"type": "git",
"url": "ssh://gitea@git.ingolf-wagner.de/palo/nixos-private-assets.git"
},

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, private_assets, ... }:
let
# todo create flake for this
errorPages = pkgs.fetchFromGitHub {
@ -38,6 +38,22 @@ in
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"stable-diffusion.ingolf-wagner.de" = {
forceSSL = true;
enableACME = true;
extraConfig = error.extraConfig;
root = "/srv/www/stable-diffusion";
locations = {
"/model-v1-4.ckpt" = {
basicAuthFile = "${private_assets}/stable-diffusion-htpasswd";
tryFiles = "/stable-diffusion-v-1-4-original/sd-v1-4.ckpt =404";
};
#"/model-v1-3.ckpt" = {
# basicAuthFile = "${private_assets}/stable-diffusion-htpasswd";
# tryFiles = "stable-diffusion-v-1-3-original/sd-v1-3.ckpt";
#};
} // error.locations;
};
"travel.ingolf-wagner.de" = {
forceSSL = true;
enableACME = true;