update for AI stuff and new nix syntax
This commit is contained in:
parent
a770f582dd
commit
4712934003
8 changed files with 152 additions and 136 deletions
|
@ -16,10 +16,11 @@ in {
|
|||
./programs/firefox.nix
|
||||
./programs/kitty.nix
|
||||
./programs/zsh.nix
|
||||
./programs/stable-diffusion.nix
|
||||
./util/ez.nix
|
||||
./util/firefox-webapp.nix
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
./programs/plasma.nix
|
||||
# inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
# ./programs/plasma.nix
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
];
|
||||
|
||||
|
@ -51,7 +52,7 @@ in {
|
|||
libnotify
|
||||
playerctl
|
||||
|
||||
kooha
|
||||
# kooha
|
||||
|
||||
croc
|
||||
|
||||
|
@ -61,7 +62,7 @@ in {
|
|||
tuxguitar
|
||||
|
||||
# kdeconnect
|
||||
plasma-browser-integration
|
||||
# plasma-browser-integration
|
||||
keepassxc
|
||||
git-credential-keepassxc
|
||||
|
||||
|
@ -70,7 +71,7 @@ in {
|
|||
mpv
|
||||
|
||||
gtk-engine-murrine
|
||||
polonium-pkgs.pkgs.plasma5Packages.polonium
|
||||
# polonium-pkgs.pkgs.plasma5Packages.polonium
|
||||
]
|
||||
++ pkgs.rice.fonts.pkgs
|
||||
++ pkgs.rice.icons.pkgs;
|
||||
|
@ -193,8 +194,9 @@ in {
|
|||
systemd.user.startServices = "sd-switch";
|
||||
ezServices = with pkgs; {
|
||||
ckb-next = "${lib.getExe ckb-next} -c -b";
|
||||
# swaybg = "${lib.getExe swaybg} -i ${rice.bg.image} -m fill";
|
||||
# # swayosd = "${lib.getExe' swayosd "swayosd"} --max-volume 100";
|
||||
};
|
||||
ezOneShots = with pkgs; {
|
||||
xrdb = "${lib.getExe xorg.xrdb} -load ${config.home.homeDirectory}/.Xresources";
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
|
|
56
home/programs/stable-diffusion.nix
Normal file
56
home/programs/stable-diffusion.nix
Normal 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";
|
||||
# };
|
||||
};
|
||||
}
|
|
@ -10,6 +10,12 @@
|
|||
type = with types; attrsOf str;
|
||||
default = {};
|
||||
};
|
||||
|
||||
ezOneShots = with lib;
|
||||
mkOption {
|
||||
type = with types; attrsOf str;
|
||||
default = {};
|
||||
};
|
||||
ezConf = with lib;
|
||||
mkOption {
|
||||
type = with types; attrsOf path;
|
||||
|
@ -39,7 +45,21 @@
|
|||
WantedBy = ["graphical-session.target"] ++ config.extraTarget;
|
||||
};
|
||||
})
|
||||
config.ezServices;
|
||||
config.ezServices
|
||||
// builtins.mapAttrs (name: cmd: {
|
||||
Unit = {
|
||||
Description = "${name}";
|
||||
After = ["graphical-session.target"] ++ config.extraTarget;
|
||||
};
|
||||
Service = {
|
||||
ExecStart = cmd;
|
||||
Type = "oneshot";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"] ++ config.extraTarget;
|
||||
};
|
||||
})
|
||||
config.ezOneShots;
|
||||
|
||||
xdg.configFile =
|
||||
builtins.mapAttrs (name: value: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue