This commit is contained in:
Ross Smyth 2025-12-26 18:59:06 -05:00 committed by GitHub
commit 66ceaaa215
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 74 additions and 0 deletions

View file

@ -5,3 +5,28 @@ Windows XP as your desktop background.
This embeds a GTK-based webview to use https://winxp.vercel.app/ as your desktop background. This embeds a GTK-based webview to use https://winxp.vercel.app/ as your desktop background.
Only works on Wayland with gtk-layer-shell. Only works on Wayland with gtk-layer-shell.
## Nix
1. Import the repo as an overlay:
```nix
let
nixpkgs = import nixpkgs {
inherit system;
overlays = [
(import winxpbg)
];
};
in
...
```
2. Launch it with your desktop environment or window manager, for example with Niri:
```nix
{
programs.niri.settings.spawn-at-startup = [
{ command = [ (lib.getExe pkgs.winxpbg) ]; }
];
}
```

4
default.nix Normal file
View file

@ -0,0 +1,4 @@
# Overlay
final: _: {
winxpbg = final.callPackage ./package.nix { };
}

45
package.nix Normal file
View file

@ -0,0 +1,45 @@
{
lib,
rustPlatform,
pkg-config,
wrapGAppsHook4,
glib,
gtk4,
webkitgtk_6_0,
gtk4-layer-shell,
}:
let
fs = lib.fileset;
files = fs.unions [
./view
];
in
rustPlatform.buildRustPackage {
pname = "winxpbg";
inherit ((builtins.fromTOML (builtins.readFile ./view/Cargo.toml)).package) version;
src = fs.toSource {
root = ./view;
fileset = files;
};
cargoLock.lockFile = ./view/Cargo.lock;
nativeBuildInputs = [
pkg-config
wrapGAppsHook4
];
buildInputs = [
glib
gtk4
webkitgtk_6_0
gtk4-layer-shell
];
meta = {
description = "Windows XP as your desktop background";
mainProgram = "minxpbg";
};
}