0939766e3a
Replace manual Home Manager module definitions in `localsend`, `pokeclicker`, and `flow-browser` with the `wisdomSimpleSlice` helper. This reduces boilerplate by centralizing the option declaration and configuration logic.
58 lines
2.2 KiB
Nix
58 lines
2.2 KiB
Nix
{ self, ... }: {
|
|
flake.homeManagerModules.wisdomBrowsersFlow = self.lib.wisdomSimpleSlice {
|
|
path = "browsers.flow";
|
|
default = false;
|
|
description = "[Flow](https://github.com/MultiboxLabs/flow-browser) — upstream AppImage wrapped for NixOS.";
|
|
packages =
|
|
pkgs:
|
|
let
|
|
pname = "flow-browser";
|
|
version = "0.11.0";
|
|
|
|
suffix = if pkgs.stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64";
|
|
|
|
hash =
|
|
if pkgs.stdenv.hostPlatform.isAarch64 then
|
|
"sha256-rTRKbNyVRJAw7ZyDR6kx+XJ4rWmErZqA0b6LP9t5eOA="
|
|
else
|
|
"sha256-/Tca4uUBfgbZQEeXdYkCz6CWxqvCl40CQpACFry1k9s=";
|
|
|
|
src = pkgs.fetchurl {
|
|
url = "https://github.com/MultiboxLabs/flow-browser/releases/download/v${version}/flow-browser-${version}-${suffix}.AppImage";
|
|
inherit hash;
|
|
};
|
|
|
|
appimageContents = pkgs.appimageTools.extractType2 { inherit pname version src; };
|
|
in
|
|
[
|
|
(pkgs.appimageTools.wrapType2 {
|
|
inherit pname version src;
|
|
|
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
|
|
|
extraInstallCommands = ''
|
|
wrapProgram $out/bin/${pname} \
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
|
|
|
|
install -m 444 -D ${appimageContents}/flow-browser.desktop -t $out/share/applications
|
|
substituteInPlace $out/share/applications/flow-browser.desktop \
|
|
--replace-fail 'Exec=AppRun --ozone-platform-hint=auto' 'Exec=${pname} --ozone-platform-hint=auto'
|
|
|
|
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/flow-browser.png \
|
|
$out/share/icons/hicolor/512x512/apps/flow-browser.png
|
|
'';
|
|
|
|
meta = {
|
|
description = "Chromium-based browser (upstream AppImage)";
|
|
homepage = "https://github.com/MultiboxLabs/flow-browser";
|
|
license = pkgs.lib.licenses.gpl3Plus;
|
|
sourceProvenance = with pkgs.lib.sourceTypes; [ binaryNativeCode ];
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
|
mainProgram = pname;
|
|
maintainers = [ ];
|
|
};
|
|
})
|
|
];
|
|
};
|
|
}
|