feat: add email integration with mu4e and protonmail-bridge
- Configure mu4e in Doom Emacs with Proton mail account - Add protonmail-bridge service and mbsync/msmtp for mail sync - Integrate sops-nix for secrets management (mail password) - Create mail.nix with full IMAP/SMTP configuration - Add ComfyUI user service module - Add custom ASCII banner for Doom dashboard - Enable nix module in Doom Emacs - Add force-quit gnome extension - Ignore secrets directory in git - also add comfy-ui
This commit is contained in:
parent
7f5ad94534
commit
0251529a8a
14 changed files with 220 additions and 22 deletions
61
home-manager/services/comfy-ui.nix
Normal file
61
home-manager/services/comfy-ui.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
comfyuiSrc = pkgs.fetchFromGitHub {
|
||||
owner = "Comfy-Org";
|
||||
repo = "ComfyUI";
|
||||
rev = "master";
|
||||
sha256 = "PQfZ0PD/PQn49ElGdzt/El8JrU7clETcLi/6ZUxm8f8=";
|
||||
};
|
||||
|
||||
dataDir = "${config.home.homeDirectory}/.local/share/comfyui";
|
||||
venvDir = "${dataDir}/.venv";
|
||||
|
||||
startScript = pkgs.writeShellScript "comfyui-start" ''
|
||||
set -e
|
||||
|
||||
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.zlib}/lib:${pkgs.libGL}/lib:/run/opengl-driver/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
mkdir -p ${dataDir}
|
||||
|
||||
# Copy source if not exists or update
|
||||
if [ ! -f "${dataDir}/main.py" ]; then
|
||||
cp -r ${comfyuiSrc}/* ${dataDir}/
|
||||
chmod -R u+w ${dataDir}
|
||||
fi
|
||||
|
||||
cd ${dataDir}
|
||||
|
||||
# Create venv on first run
|
||||
if [ ! -d "${venvDir}" ]; then
|
||||
${pkgs.python313}/bin/python -m venv ${venvDir}
|
||||
${venvDir}/bin/pip install --upgrade pip
|
||||
fi
|
||||
|
||||
# Always ensure deps are installed
|
||||
if [ ! -f "${venvDir}/.deps-installed" ]; then
|
||||
${venvDir}/bin/pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu124
|
||||
${venvDir}/bin/pip install -r requirements.txt
|
||||
touch ${venvDir}/.deps-installed
|
||||
fi
|
||||
|
||||
exec ${venvDir}/bin/python main.py "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.python313 pkgs.git ];
|
||||
|
||||
systemd.user.services.comfy-ui = {
|
||||
Unit = {
|
||||
Description = "ComfyUI";
|
||||
After = [ "network.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${startScript}";
|
||||
Restart = "on-failure";
|
||||
Environment = [ "CUDA_VISIBLE_DEVICES=0" ];
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue