Nix Flake of ImageGlass
- Nix 59.5%
- Python 40.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| scripts | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| renovate.json | ||
ImageGlass Nix Flake
Wraps https://github.com/d2phap/ImageGlass/ AppImage with appimageTools.wrapType2.
Use as flake input
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
imageglass.url = "https://git.versette.me/Versette/ImageGlassNix";
};
outputs = { nixpkgs, imageglass, ... }: {
# package: imageglass.packages.x86_64-linux.imageglass
# app: nix run imageglass#imageglass
};
}
With nixpkgs overlay:
nixpkgs.overlays = [ inputs.imageglass.overlays.default ];
# then: pkgs.imageglass
NixOS
{ inputs, ... }: {
imports = [ inputs.imageglass.nixosModules.default ];
}
This adds the overlay and environment.systemPackages = [ imageglass ].
home-manager
{ inputs, ... }: {
imports = [ inputs.imageglass.homeManagerModules.default ];
}
This adds the overlay and home.packages = [ imageglass ].
Try it
nix run .#imageglass -- --help
nix build .#imageglass
nix profile install .#imageglass
Automatic ImageGlass updates (Renovate + Forgejo CI)
renovate.json tracks d2phap/ImageGlass GitHub releases via a regex
manager on the # renovate: marker above version in flake.nix
(loose versioning, so 4-part versions like 10.0.6.906 work). The
download URL in flake.nix is built from ${version}, so Renovate only
bumps one line; scripts/update-imageglass-hash.py (run as
postUpgradeTasks) then refreshes the fetchurl SRI hash from the
release asset digest.
.forgejo/workflows/renovate.yml runs ghcr.io/renovatebot/renovate:full
daily (02:00) and on manual dispatch.