Update fooocus and add as subflake
parent
070d64145e
commit
e47eb158af
276
flake.lock
276
flake.lock
|
@ -60,6 +60,45 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"devshell": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1663445644,
|
||||||
|
"narHash": "sha256-+xVlcK60x7VY1vRJbNUEAHi17ZuoQxAIH4S4iUFUGBA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"rev": "e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dream2nix": {
|
||||||
|
"inputs": {
|
||||||
|
"devshell": "devshell",
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nix-unit": "nix-unit",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1697623956,
|
||||||
|
"narHash": "sha256-/YfNW+FYOcfcrT3RmvVZMipP9S/F5DFRZ/Hs7lIxD+M=",
|
||||||
|
"owner": "yorickvP",
|
||||||
|
"repo": "dream2nix",
|
||||||
|
"rev": "372c3e8fe1f4ae909cb198dff0b9c6d6127b92eb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "yorickvP",
|
||||||
|
"repo": "dream2nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"emacs-overlay": {
|
"emacs-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
@ -82,6 +121,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1673956053,
|
||||||
|
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1668681692,
|
"lastModified": 1668681692,
|
||||||
|
@ -97,7 +152,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_2": {
|
"flake-compat_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1688025799,
|
"lastModified": 1688025799,
|
||||||
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
||||||
|
@ -113,6 +168,28 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"fooocus",
|
||||||
|
"dream2nix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1675933616,
|
||||||
|
"narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "47478a4a003e745402acf63be7f9a092d51b83d7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"nixpkgs-wayland",
|
"nixpkgs-wayland",
|
||||||
|
@ -173,6 +250,24 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689068808,
|
||||||
|
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_4": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_4"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694529238,
|
"lastModified": 1694529238,
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||||
|
@ -187,6 +282,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fooocus": {
|
||||||
|
"inputs": {
|
||||||
|
"dream2nix": "dream2nix",
|
||||||
|
"nixpkgs": [
|
||||||
|
"fooocus",
|
||||||
|
"dream2nix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1,
|
||||||
|
"narHash": "sha256-tHWUJkwbjf/NTs2WgvuGwLC48QnY7w2be2+PB45TfDw=",
|
||||||
|
"path": "./pkgs/fooocus",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"path": "./pkgs/fooocus",
|
||||||
|
"type": "path"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -231,7 +346,7 @@
|
||||||
},
|
},
|
||||||
"lib-aggregate": {
|
"lib-aggregate": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_4",
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -250,9 +365,9 @@
|
||||||
},
|
},
|
||||||
"nix-eval-jobs": {
|
"nix-eval-jobs": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694654058,
|
"lastModified": 1694654058,
|
||||||
|
@ -268,6 +383,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-github-actions": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"fooocus",
|
||||||
|
"dream2nix",
|
||||||
|
"nix-unit",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1688870561,
|
||||||
|
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-github-actions",
|
||||||
|
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-github-actions",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-index-database": {
|
"nix-index-database": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -329,6 +467,35 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-unit": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": [
|
||||||
|
"fooocus",
|
||||||
|
"dream2nix",
|
||||||
|
"flake-parts"
|
||||||
|
],
|
||||||
|
"nix-github-actions": "nix-github-actions",
|
||||||
|
"nixpkgs": [
|
||||||
|
"fooocus",
|
||||||
|
"dream2nix",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694670962,
|
||||||
|
"narHash": "sha256-HvMq0TJGYSx37zHm4j2d+JUZx4/6X7xKEt/0DeCiwjQ=",
|
||||||
|
"owner": "adisbladis",
|
||||||
|
"repo": "nix-unit",
|
||||||
|
"rev": "3ed2378bddad85257fc508a291408f9ed9673d01",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "adisbladis",
|
||||||
|
"repo": "nix-unit",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694710316,
|
"lastModified": 1694710316,
|
||||||
|
@ -346,7 +513,7 @@
|
||||||
"nixos-mailserver": {
|
"nixos-mailserver": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blobs": "blobs",
|
"blobs": "blobs",
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
|
@ -371,18 +538,17 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694753796,
|
"lastModified": 1698318101,
|
||||||
"narHash": "sha256-QPE7dqcicQH/nq9aywVXJWWtci4FvxHaM+BSIEbGBvA=",
|
"narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "360a7d31c30abefdc490d203f80e3221b7a24af2",
|
"rev": "63678e9f3d3afecfeafa0acead6239cdb447574c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-23.05",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"type": "indirect"
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-22_11": {
|
"nixpkgs-22_11": {
|
||||||
|
@ -463,7 +629,7 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-wayland": {
|
"nixpkgs-wayland": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_3",
|
||||||
"lib-aggregate": "lib-aggregate",
|
"lib-aggregate": "lib-aggregate",
|
||||||
"nix-eval-jobs": "nix-eval-jobs",
|
"nix-eval-jobs": "nix-eval-jobs",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -485,6 +651,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694753796,
|
||||||
|
"narHash": "sha256-QPE7dqcicQH/nq9aywVXJWWtci4FvxHaM+BSIEbGBvA=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "360a7d31c30abefdc490d203f80e3221b7a24af2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-23.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694651847,
|
"lastModified": 1694651847,
|
||||||
"narHash": "sha256-W+2eI96glLiEwLnX/kWn5HDO7WfKKkF0lKW9yyNLEbY=",
|
"narHash": "sha256-W+2eI96glLiEwLnX/kWn5HDO7WfKKkF0lKW9yyNLEbY=",
|
||||||
|
@ -500,17 +682,41 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pre-commit-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_3",
|
||||||
|
"nixpkgs": [
|
||||||
|
"fooocus",
|
||||||
|
"dream2nix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1646153636,
|
||||||
|
"narHash": "sha256-AlWHMzK+xJ1mG267FdT8dCq/HvLCA6jwmx2ZUy5O8tY=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"rev": "b6bc0b21e1617e2b07d8205e7fae7224036dfa4b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"emacs-overlay": "emacs-overlay",
|
"emacs-overlay": "emacs-overlay",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
|
"fooocus": "fooocus",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nix-npm-buildpackage": "nix-npm-buildpackage",
|
"nix-npm-buildpackage": "nix-npm-buildpackage",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixos-mailserver": "nixos-mailserver",
|
"nixos-mailserver": "nixos-mailserver",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-mozilla": "nixpkgs-mozilla",
|
"nixpkgs-mozilla": "nixpkgs-mozilla",
|
||||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||||
"timesync": "timesync"
|
"timesync": "timesync"
|
||||||
|
@ -561,6 +767,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"timesync": {
|
"timesync": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nix-npm-buildpackage": "nix-npm-buildpackage_2",
|
"nix-npm-buildpackage": "nix-npm-buildpackage_2",
|
||||||
|
@ -583,6 +804,29 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"treefmt-nix": {
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"fooocus",
|
||||||
|
"dream2nix",
|
||||||
|
"nix-unit",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689620039,
|
||||||
|
"narHash": "sha256-BtNwghr05z7k5YMdq+6nbue+nEalvDepuA7qdQMAKoQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "719c2977f958c41fa60a928e2fbc50af14844114",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-wayland",
|
"nixpkgs-wayland",
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
url = "github:datakami/timesync";
|
url = "github:datakami/timesync";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
fooocus.url = "path:./pkgs/fooocus";
|
||||||
};
|
};
|
||||||
outputs = inputs@{ nixpkgs, home-manager, nixpkgs-mozilla, emacs-overlay
|
outputs = inputs@{ nixpkgs, home-manager, nixpkgs-mozilla, emacs-overlay
|
||||||
, nixpkgs-wayland, nixos-hardware, agenix, flake-utils
|
, nixpkgs-wayland, nixos-hardware, agenix, flake-utils
|
||||||
|
@ -110,6 +111,7 @@
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
flake-inputs = inputs;
|
flake-inputs = inputs;
|
||||||
nix-npm-buildpackage = nix-npm-buildpackage.legacyPackages."${final.system}";
|
nix-npm-buildpackage = nix-npm-buildpackage.legacyPackages."${final.system}";
|
||||||
|
fooocus = inputs.fooocus.packages.${final.system}.default;
|
||||||
inherit (nixpkgs-wayland.packages.${final.system}) wldash;
|
inherit (nixpkgs-wayland.packages.${final.system}) wldash;
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -5,6 +5,7 @@ let
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
|
inputs.fooocus.nixosModules.default
|
||||||
../modules/dashy.nix
|
../modules/dashy.nix
|
||||||
../modules/tor-hidden-service.nix
|
../modules/tor-hidden-service.nix
|
||||||
../modules/nginx.nix
|
../modules/nginx.nix
|
||||||
|
|
|
@ -22,5 +22,6 @@
|
||||||
packages.x86_64-linux.default = package;
|
packages.x86_64-linux.default = package;
|
||||||
devShells.x86_64-linux.default = package.devShell;
|
devShells.x86_64-linux.default = package.devShell;
|
||||||
packages.x86_64-linux.lock = package.config.lock.refresh;
|
packages.x86_64-linux.lock = package.config.lock.refresh;
|
||||||
|
nixosModules.default = ./module.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,139 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let cfg = config.services.fooocus; in
|
||||||
|
{
|
||||||
|
options.services.fooocus = with lib; {
|
||||||
|
enable = mkEnableOption "Fooocus";
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
description = "The package name of the Fooocus server";
|
||||||
|
default = pkgs.fooocus;
|
||||||
|
};
|
||||||
|
port = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
description = "The port to run the Fooocus server on";
|
||||||
|
default = 7860;
|
||||||
|
};
|
||||||
|
listen = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "The address to listen on";
|
||||||
|
default = "127.0.0.1";
|
||||||
|
};
|
||||||
|
path = {
|
||||||
|
models = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the models directory";
|
||||||
|
default = "/var/models/Fooocus/models";
|
||||||
|
};
|
||||||
|
outputs = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the outputs directory";
|
||||||
|
default = "/var/sd/outputs/sdxl";
|
||||||
|
};
|
||||||
|
checkpoints = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the checkpoints directory";
|
||||||
|
default = "${cfg.path.models}/checkpoints";
|
||||||
|
};
|
||||||
|
loras = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the loras directory";
|
||||||
|
default = "${cfg.path.models}/loras";
|
||||||
|
};
|
||||||
|
embeddings = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the embeddings directory";
|
||||||
|
default = "${cfg.path.models}/embeddings";
|
||||||
|
};
|
||||||
|
vae_approx = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the vae_approx directory";
|
||||||
|
default = "${cfg.path.models}/vae_approx";
|
||||||
|
};
|
||||||
|
upscale_models = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the upscale_models directory";
|
||||||
|
default = "${cfg.path.models}/upscale_models";
|
||||||
|
};
|
||||||
|
inpaint = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the inpaint directory";
|
||||||
|
default = "${cfg.path.models}/inpaint";
|
||||||
|
};
|
||||||
|
controlnet = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the controlnet directory";
|
||||||
|
default = "${cfg.path.models}/controlnet";
|
||||||
|
};
|
||||||
|
clip_vision = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the clip_vision directory";
|
||||||
|
default = "${cfg.path.models}/clip_vision";
|
||||||
|
};
|
||||||
|
fooocus_expansion = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = "The path to the fooocus_expansion directory";
|
||||||
|
default = "${cfg.path.models}/prompt_expansion/fooocus_expansion";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
description = "The configuration for the Fooocus server";
|
||||||
|
default = {
|
||||||
|
"path_checkpoints" = "${cfg.path.checkpoints}";
|
||||||
|
"path_loras" = "${cfg.path.loras}";
|
||||||
|
"path_embeddings" = "${cfg.path.embeddings}";
|
||||||
|
"path_vae_approx" = "${cfg.path.vae_approx}";
|
||||||
|
"path_upscale_models" = "${cfg.path.upscale_models}";
|
||||||
|
"path_inpaint" = "${cfg.path.inpaint}";
|
||||||
|
"path_controlnet" = "${cfg.path.controlnet}";
|
||||||
|
"path_clip_vision" = "${cfg.path.clip_vision}";
|
||||||
|
"path_fooocus_expansion" = "${cfg.path.fooocus_expansion}";
|
||||||
|
"path_outputs" = "${cfg.path.outputs}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
config = let
|
||||||
|
configFile = pkgs.writeText "config.json" (builtins.toJSON cfg.config);
|
||||||
|
in lib.mkIf cfg.enable {
|
||||||
|
systemd.services.fooocus = {
|
||||||
|
description = "Fooocus server";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
# it wants to write for no good reason
|
||||||
|
# todo: remove these symlinks
|
||||||
|
ExecStartPre = pkgs.writeShellScript "pre-start" ''
|
||||||
|
cp ${configFile} /var/lib/fooocus/config.txt
|
||||||
|
chmod +w /var/lib/fooocus/config.txt
|
||||||
|
mkdir /tmp/fooocus
|
||||||
|
ln -sfn ${cfg.package}/javascript /var/lib/fooocus/javascript
|
||||||
|
ln -sfn ${cfg.package}/css /var/lib/fooocus/css
|
||||||
|
'';
|
||||||
|
ExecStart = "${cfg.package}/webui.py --port ${toString cfg.port} --disable-auto-launch --listen ${cfg.listen}";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = "10";
|
||||||
|
User = "fooocus";
|
||||||
|
Group = "fooocus";
|
||||||
|
PrivateTmp = true;
|
||||||
|
ProtectSystem = "full";
|
||||||
|
ProtectHome = true;
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
WorkingDirectory = "/var/lib/fooocus";
|
||||||
|
ReadWritePaths = [
|
||||||
|
"/var/lib/fooocus"
|
||||||
|
"/var/models/Fooocus"
|
||||||
|
"/var/sd/outputs/sdxl"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
users.users.fooocus = {
|
||||||
|
isSystemUser = true;
|
||||||
|
createHome = true;
|
||||||
|
group = "fooocus";
|
||||||
|
home = "/var/lib/fooocus";
|
||||||
|
};
|
||||||
|
users.groups.fooocus = {};
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,24 +4,18 @@
|
||||||
name = "Fooocus";
|
name = "Fooocus";
|
||||||
version = "2.1.807";
|
version = "2.1.807";
|
||||||
|
|
||||||
# todo
|
|
||||||
mkDerivation = {
|
mkDerivation = {
|
||||||
src = config.deps.fetchFromGitHub {
|
src = config.deps.fetchFromGitHub {
|
||||||
owner = "lllyasviel";
|
owner = "yorickvP";
|
||||||
repo = config.name;
|
repo = config.name;
|
||||||
rev = "515846321686424bb5e61ad9f1912c49c37903eb";
|
rev = "cc11a770ea8db7573ae58b9b8fc30edabaa4a146";
|
||||||
hash = "sha256-gKLkMntmZnfwAyOwivcf8mRmdBSIGQhhHnAaGQgtx40=";
|
hash = "sha256-9DV9r1GG3vVwsx+0KYXL3Sd8g5qjSShbBWa1j74BnUs=";
|
||||||
};
|
};
|
||||||
buildPhase = "true";
|
buildPhase = "true";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp -r ./* $out
|
cp -r ./* $out
|
||||||
mv $out/models{,-orig}
|
ln -s /tmp/fooocus $out/input
|
||||||
ln -s /var/models/Fooocus/models $out/models
|
|
||||||
ln -s /var/sd/outputs/sdxl $out/outputs
|
|
||||||
ln -s /var/sd/sdxl-input $out/input
|
|
||||||
ln -s /var/sd/config.txt $out/config.txt
|
|
||||||
ln -s /var/sd/config_modification_tutorial.txt $out/config_modification_tutorial.txt
|
|
||||||
for f in $out/{launch,webui}.py; do
|
for f in $out/{launch,webui}.py; do
|
||||||
chmod +x $f
|
chmod +x $f
|
||||||
sed -i '1s;^;#!/usr/bin/env python\n;' $f
|
sed -i '1s;^;#!/usr/bin/env python\n;' $f
|
||||||
|
|
Loading…
Reference in New Issue