Skip to content

Commit

Permalink
programs/pop-launcher: make plugin packages not rewrite symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
foo-dogsquared committed Aug 10, 2022
1 parent 10fd8f8 commit 8651fc7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/nixos/programs/pop-launcher.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ let
dontRewriteSymlinks = true;
});

# Some plugins may be packaged busybox-style with multiple plugins in one
# binary.
plugins = lib.lists.map (p: p.overrideAttrs (prev: {
dontRewriteSymlinks = true;
})) cfg.plugins;

# Plugins and scripts are assumed to be packaged at
# `$out/share/pop-launcher`.
pluginsDir = pkgs.symlinkJoin {
name = "pop-launcher-plugins-system";
paths = builtins.map (p: "${p}/share/pop-launcher") (cfg.plugins ++ [ package ]);
paths = builtins.map (p: "${p}/share/pop-launcher") (plugins ++ [ package ]);
};
in
{
Expand Down Expand Up @@ -64,9 +70,7 @@ in
};

config = lib.mkIf cfg.enable {
environment.etc.pop-launcher = lib.mkIf (cfg.plugins != []) {
source = pluginsDir;
};
environment.etc.pop-launcher.source = pluginsDir;

environment.systemPackages = with pkgs; [
pop-launcher
Expand Down

0 comments on commit 8651fc7

Please sign in to comment.