nixcfg/nixosModules/default.nix

45 lines
1.2 KiB
Nix
Raw Normal View History

inputs: {
2024-04-07 22:16:33 -04:00
config,
pkgs,
lib,
2024-04-07 22:16:33 -04:00
...
}: {
2024-05-27 21:39:30 -04:00
imports = [
./apps
./containers
./desktop
./scripts
./services
./system
./user
];
nixpkgs.overlays = [
(final: prev: {
webcord = prev.webcord.overrideAttrs (old: {
installPhase = let
binPath = lib.makeBinPath [pkgs.xdg-utils];
in ''
runHook preInstall
# Remove dev deps that aren't necessary for running the app
npm prune --omit=dev
mkdir -p $out/lib/node_modules/webcord
cp -r app node_modules sources package.json $out/lib/node_modules/webcord/
install -Dm644 sources/assets/icons/app.png $out/share/icons/hicolor/256x256/apps/webcord.png
# Add xdg-utils to path via suffix, per PR #181171
makeWrapper '${lib.getExe pkgs.electron}' $out/bin/webcord \
--suffix PATH : "${binPath}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime}}" \
--add-flags $out/lib/node_modules/webcord/
runHook postInstall
'';
});
})
];
2024-03-28 16:40:23 -04:00
}