mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-04-07 13:28:59 +08:00
currently packaging as a nixosModule so should be easy to integrate with nixos generators in the future. Also looking at making a docker image without systemd
35 lines
644 B
Nix
35 lines
644 B
Nix
args@{
|
|
lib,
|
|
self,
|
|
package-name,
|
|
pythonSets,
|
|
nixpkgs,
|
|
...
|
|
}:
|
|
lib.flake.forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
pythonSet = pythonSets.${system};
|
|
folders = lib.flake.getSubdirs ./.;
|
|
folderAttrs = (
|
|
name: {
|
|
name = name;
|
|
value = import ./${name} (
|
|
args
|
|
// {
|
|
inherit pkgs system pythonSet;
|
|
}
|
|
); # You can replace this with any value
|
|
}
|
|
);
|
|
in
|
|
builtins.listToAttrs (map folderAttrs folders)
|
|
// {
|
|
default = self.devShells.${system}.${package-name};
|
|
}
|
|
)
|