- C 43.9%
- JavaScript 33.7%
- Nix 22.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| source | ||
| AGENTS.md | ||
| COPYING | ||
| flake.lock | ||
| flake.nix | ||
| package.nix | ||
| README.md | ||
WebKit Web App
WebKit Web App is a small, configurable GTK 4 and WebKitGTK 6.0 shell plus a Nix factory for turning an HTTPS site into a desktop application. Each package builds a native launcher, desktop entry, and icon. The launcher keeps cookies, site data, and cache in per-application XDG directories and sends HTTP(S) links for other hosts to the system browser.
Requirements
- Nix with flakes enabled
- an
aarch64-linuxorx86_64-linuxsystem - a graphical Linux session capable of running GTK 4 and WebKitGTK
- network access required by the configured web site
Nix supplies the compiler and GTK/WebKitGTK build dependencies.
Factory options
pname, name, url, applicationId, icon, and comment are required.
| Option | Meaning | Default |
|---|---|---|
pname |
Package, executable, desktop-file, and XDG data/cache name | required |
name |
Human-readable window and desktop name | required |
url |
Initial HTTPS URL; its host is treated as internal | required |
applicationId |
Unique reverse-DNS GTK application ID and startup class | required |
icon |
Path to an SVG icon | required |
comment |
Desktop-entry description | required |
categories |
Semicolon-delimited desktop categories | "Network;Utility;" |
forwardCtrlPeriod |
Forward Ctrl+. to the page instead of GTK emoji input | false |
enableLinkHints |
Enable keyboard link hints toggled with Ctrl+; | false |
enableMultipleWindows |
Enable Ctrl+N to open another application window | false |
appendCurrentUser |
Append the URL-escaped current username as a path segment | false |
With link hints active, type a displayed label to activate its target, press Escape to cancel, or press Ctrl+; again to toggle the hints off.
Use as an overlay
Add this flake as an input and apply its default overlay:
{
inputs.webkit-web-app.url = "path:/path/to/webkit-web-app";
outputs = { nixpkgs, webkit-web-app, ... }: {
packages.x86_64-linux.my-web-app =
let
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ webkit-web-app.overlays.default ];
};
in
pkgs.webkitWebApp {
pname = "my-web-app";
name = "My Web App";
url = "https://example.com";
applicationId = "com.example.MyWebApp";
icon = ./my-web-app.svg;
comment = "Open My Web App";
enableLinkHints = true;
};
};
}
Use lib.mkWebkitWebApp
The library factory can be called directly. Pass pkgs explicitly for a pure,
reproducible flake evaluation (or pass system to select this flake's nixpkgs):
packages.x86_64-linux.my-web-app = webkit-web-app.lib.mkWebkitWebApp {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
pname = "my-web-app";
name = "My Web App";
url = "https://example.com/app";
applicationId = "com.example.MyWebApp";
icon = ./my-web-app.svg;
comment = "Open My Web App";
categories = "Network;Office;";
enableMultipleWindows = true;
};
Build and run the demo
The default package is a demo configured for https://example.com:
nix build
./result/bin/webkit-web-app-demo
Run it without retaining a result symlink:
nix run
To build a consuming flake's named package, use
nix build .#my-web-app; its launcher is then available under
result/bin/my-web-app.
License
Copyright 2026 Alexander Khodyrev a@akho.name. Licensed under the GNU Affero General Public License, version 3 or later. See COPYING.