update for AI stuff and new nix syntax

This commit is contained in:
atagen 2024-04-30 02:38:36 +10:00
parent a770f582dd
commit 4712934003
8 changed files with 152 additions and 136 deletions

View file

@ -0,0 +1,56 @@
{
config,
pkgs,
lib,
...
}: {
# TODO: create a flake for this
# https://github.com/AbdBarho/stable-diffusion-webui-docker/
config.programs.firefox.webapps = {
"StableDiffusion" = {
url = "http://127.0.0.1:7860";
id = 5;
extraSettings = config.programs.firefox.profiles.default.settings;
name = "Stable Diffusion Client";
};
};
# consider making these manually activated systemd services
config.systemd.user.services = {
stable-diffusion = {
Unit.Description = "Stable Diffusion Backend";
Service = {
WorkingDirectory = "${config.home.homeDirectory}/code/etc/stable-diffusion-webui-docker";
ExecStart = "${lib.getExe pkgs.docker} compose --profile comfy up --build";
# ExecStop = "${lib.getExe pkgs.docker} compose stop";
};
};
# stable-diffusion-dl = {}
};
config.xdg.desktopEntries = {
stable-diffusion = {
name = "Stable Diffusion Backend Start";
type = "Application";
exec = "systemctl --user start stable-diffusion.service";
};
stable-diffusion-stop = {
name = "Stable Diffusion Backend Stop";
type = "Application";
exec = "systemctl --user stop stable-diffusion.service";
};
# settings = {
# Path = "${config.home.homeDirectory}/code/etc/stable-diffusion-webui-docker";
# };
# exec = "kitty -d ${config.home.homeDirectory}/code/etc/stable-diffusion-webui-docker sh -c \"docker compose --profile comfy up --build\"";
# stable-diffusion-dl = {
# name = "Stable Diffusion Setup";
# type = "Application";
# settings = {
# Path = "${config.home.homeDirectory}/code/etc/stable-diffusion-webui-docker";
# };
# exec = "kitty --hold docker compose --profile download up --build";
# };
};
}