From 3040105f9cce1a923e2af656fd84f81ef0ca51ab Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sat, 14 Jun 2025 17:04:38 +0800 Subject: [PATCH] feat(desktop): enable stable-diffusion-webui-forge module on nemesis system --- flake.lock | 12 ++++++------ flake.nix | 3 ++- modules/home/desktop/default.nix | 4 ---- modules/nixos/hardware/nvidia.nix | 1 - systems/x86_64-linux/nemesis/default.nix | 6 ++++++ 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 84513c4..66f4bd1 100644 --- a/flake.lock +++ b/flake.lock @@ -624,16 +624,16 @@ ] }, "locked": { - "lastModified": 1748219198, - "narHash": "sha256-RRDI12SLfm9lP7tq4vUr/c/TRj0+mgRjAThdnwTJgIE=", - "owner": "Janrupf", + "lastModified": 1749893259, + "narHash": "sha256-xf2axyf+WuoSfDWQLhQigfms2qzSZzLwlFK7VwVxTkw=", + "owner": "rrvsh", "repo": "stable-diffusion-webui-nix", - "rev": "381e5de206d4962d94a8ebc97d6dc04395928e0c", + "rev": "0c3ebba0812cc3aa34ed16c6b4a85d96fbb2722f", "type": "github" }, "original": { - "owner": "Janrupf", - "ref": "main", + "owner": "rrvsh", + "ref": "add-forge-module", "repo": "stable-diffusion-webui-nix", "type": "github" } diff --git a/flake.nix b/flake.nix index b21d1b5..d24e5cb 100644 --- a/flake.nix +++ b/flake.nix @@ -48,7 +48,7 @@ stable-diffusion-webui-nix.inputs.flake-utils.follows = "flake-utils"; stable-diffusion-webui-nix.inputs.nixpkgs.follows = "nixpkgs"; stable-diffusion-webui-nix.inputs.python-flexseal.follows = "python-flexseal"; - stable-diffusion-webui-nix.url = "github:Janrupf/stable-diffusion-webui-nix/main"; + stable-diffusion-webui-nix.url = "github:rrvsh/stable-diffusion-webui-nix/add-forge-module"; stylix.inputs.flake-compat.follows = "flake-compat"; stylix.inputs.flake-parts.follows = "flake-parts"; stylix.inputs.nur.follows = "nur"; @@ -81,6 +81,7 @@ impermanence.nixosModules.impermanence sops-nix.nixosModules.sops stylix.nixosModules.stylix + stable-diffusion-webui-nix.nixosModules.default ]; homes.modules = with inputs; [ impermanence.homeManagerModules.impermanence diff --git a/modules/home/desktop/default.nix b/modules/home/desktop/default.nix index 4e6e9e7..1aba2e6 100644 --- a/modules/home/desktop/default.nix +++ b/modules/home/desktop/default.nix @@ -13,10 +13,6 @@ in { config = mkIf upstreamCfg.enable (mkMerge [ (lib.mkIf (osConfig.hardware.gpu == "nvidia") { - home.packages = [ pkgs.stable-diffusion-webui.forge.cuda ]; - home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [ - ".local/share/stable-diffusion-webui" - ]; }) (lib.mkIf osConfig.desktop.enableSpotifyd { services.spotifyd.enable = true; diff --git a/modules/nixos/hardware/nvidia.nix b/modules/nixos/hardware/nvidia.nix index 23644c2..0f537f2 100644 --- a/modules/nixos/hardware/nvidia.nix +++ b/modules/nixos/hardware/nvidia.nix @@ -21,7 +21,6 @@ __GLX_VENDOR_LIBRARY_NAME = "nvidia"; NVD_BACKEND = "direct"; }; - nix.settings.substituters = [ "https://cuda-maintainers.cachix.org" ]; nix.settings.trusted-public-keys = [ "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" diff --git a/systems/x86_64-linux/nemesis/default.nix b/systems/x86_64-linux/nemesis/default.nix index dcb3473..13076d2 100644 --- a/systems/x86_64-linux/nemesis/default.nix +++ b/systems/x86_64-linux/nemesis/default.nix @@ -1,3 +1,4 @@ +{ pkgs, ... }: { imports = [ ../common.nix @@ -32,5 +33,10 @@ enable = true; client.enable = true; }; + sd-webui-forge = { + enable = true; + listen = true; + extraArgs = "--cuda-malloc"; + }; }; }