ark/users/modules/discord/default.nix

27 lines
621 B
Nix
Raw Normal View History

2022-08-11 05:44:58 +03:00
{
2022-08-23 08:18:37 +03:00
config,
2022-08-11 05:44:58 +03:00
inputs,
pkgs,
2022-09-02 16:16:07 +03:00
lib,
2022-08-11 05:44:58 +03:00
...
}: {
2022-08-23 08:18:37 +03:00
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
2022-09-02 16:16:07 +03:00
".config/WebCord"
2022-08-23 08:18:37 +03:00
];
2022-09-02 18:02:46 +03:00
home.packages = let
2022-09-02 16:16:07 +03:00
pkg = inputs.webcord.packages.${pkgs.system}.webcord;
2022-09-02 18:02:46 +03:00
in [
(
pkgs.runCommand pkg.name {nativeBuildInputs = [pkgs.makeWrapper];} ''
mkdir -p $out
ln -sf ${pkg}/* $out/
rm $out/bin
mkdir $out/bin
ln -s ${pkg}/bin/webcord $out/bin/webcord
wrapProgram $out/bin/webcord \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [pkgs.pipewire]}"
''
)
];
2022-08-11 05:44:58 +03:00
}