Skip to content

Conversation

@NovaViper
Copy link
Contributor

Fixes #3724
Add change script that adds in theme files for plugins that have them.

Supersedes #7904, switched from using recursive import to onChange script, since recursive imports can cause "Import From Derivation" issues (especially when the allow-import-from-derivation setting is disabled Discuss from:
#7904 (comment)

Description

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.
    • Generate a news entry. See News
    • Basic tests added. See Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See News

Fixes nix-community#3724
Add change script that adds in theme files for plugins that have them.

Supersedes nix-community#7904, switched from using recursive import to onChange
script, since recursive imports can cause "Import From Derivation"
issues (especially when the `allow-import-from-derivation` setting is
disabled Discuss from:
nix-community#7904 (comment)
@github-actions github-actions bot added the shell label Oct 1, 2025
@NovaViper
Copy link
Contributor Author

🤔 I'm wondering if I should also add a new news entry

@NovaViper
Copy link
Contributor Author

cc for review: Guanran928 khaneliman

@NovaViper
Copy link
Contributor Author

I gave it a test locally and it worked though it does leave behind stuff.. unsure how to get the lingeirng files cleaned up 🤔

@rycee
Copy link
Member

rycee commented Oct 4, 2025

Perhaps it would be possible to create a derivation that takes the plugins as input and produces a whole directory structure as output for use with xdg.configFile."fish/themes" = { source = mkThemeDirs cfg.plugins; recursive = true; }.

A bit similar to dbus.nix:

xdg.dataFile."dbus-1/services" = {
recursive = true;
source = pkgs.symlinkJoin {
name = "user-dbus-services";
paths = cfg.packages;
stripPrefix = "/share/dbus-1/services";
};

@NovaViper
Copy link
Contributor Author

Perhaps it would be possible to create a derivation that takes the plugins as input and produces a whole directory structure as output for use with xdg.configFile."fish/themes" = { source = mkThemeDirs cfg.plugins; recursive = true; }.

A bit similar to dbus.nix:

xdg.dataFile."dbus-1/services" = {
recursive = true;
source = pkgs.symlinkJoin {
name = "user-dbus-services";
paths = cfg.packages;
stripPrefix = "/share/dbus-1/services";
};

🤔 Only issue with that is would it account for multiple plugins. Say if someone wants to try out some themes (or have a dark mode and light mode theme), every theme would have to go into the exact same folder. My previous PR handled that issue fine but unfortunately introduced IFD issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support fish theme plugins

2 participants