• 0 Posts
  • 5 Comments
Joined 2 months ago
cake
Cake day: January 7th, 2026

help-circle

  • pkgs.symlinkJoin might help:

    {pkgs, ...}: let
      plugin1 = pkgs.fetchFromGitHub { ... };
      plugin2 = pkgs.fetchFromGitHub { ... };
    in {
      xdg.dataFile = {
        "krita/pykrita" = {
          enable = true;
          source = pkgs.symlinkJoin {
            name = "pykrita";
            paths = [
              plugin1
              plugin2
            ];
          };
          recursive = true;
        };
      };
    }
    

    You might also want to manage your plugins in separate files:

    # krita-plugins.nix
    {
      config,
      lib,
      pkgs,
      ...
    }:
    with lib; {
      options.yourOptions.krita.plugins = mkOption {
        type = types.listOf types.path;
        default = [];
      };
      config = {
        xdg.dataFile = {
          "krita/pykrita" = {
            enable = true;
            source = pkgs.symlinkJoin {
              name = "pykrita";
              paths = config.yourOptions.krita.plugins;
            };
            recursive = true;
          };
        };
      };
    }
    
    # kirta-plugin-a.nix
    {pkgs, ...}: {
      yourOptions.krita.plugins = [
        (pkgs.fetchFromGitHub { ... })
      ];
    }
    
    # kirta-plugin-b.nix
    {pkgs, ...}: {
      yourOptions.krita.plugins = [
        (pkgs.fetchFromGitHub { ... })
      ];
    }