1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-13 06:39:44 +01:00

gallery-dl: add package option

This commit is contained in:
musjj 2024-03-07 00:43:55 +07:00 committed by Mikilio
parent f4e057dba5
commit 98d1d23212
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F
2 changed files with 6 additions and 2 deletions

View file

@ -14,6 +14,8 @@ in {
options.programs.gallery-dl = {
enable = mkEnableOption "gallery-dl";
package = mkPackageOption pkgs "gallery-dl" { };
settings = mkOption {
type = jsonFormat.type;
default = { };
@ -32,7 +34,7 @@ in {
};
config = mkIf cfg.enable {
home.packages = [ pkgs.gallery-dl ];
home.packages = [ cfg.package ];
xdg.configFile."gallery-dl/config.json" = mkIf (cfg.settings != { }) {
source = jsonFormat.generate "gallery-dl-settings" cfg.settings;

View file

@ -1,9 +1,11 @@
{ ... }:
{ config, ... }:
{
programs.gallery-dl = {
enable = true;
package = config.lib.test.mkStubPackage { };
settings = {
cache.file = "~/gallery-dl/cache.sqlite3";
extractor.base-directory = "~/gallery-dl/";