No description
  • Nix 84.1%
  • Shell 15.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
marti 9e1842e1b2
All checks were successful
Check / check (push) Successful in 44s
ci: update upstream daily through sources.json
update.sh finds the newest upstream release and rewrites sources.json
(version and hash), which package.nix reads. The new update workflow
runs it and nix flake update daily, and pushes to main only if
nix flake check still passes, one commit for the lock and one for the
bump.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 16:50:55 +02:00
.forgejo/workflows ci: update upstream daily through sources.json 2026-10-12 16:50:55 +02:00
.gitignore Package PhotoGIMP as a standalone flake 2026-09-01 19:01:15 +02:00
alejandra.toml Package PhotoGIMP as a standalone flake 2026-09-01 19:01:15 +02:00
flake.lock Export a home-manager module instead of a package 2026-09-01 20:39:39 -04:00
flake.nix ci: update upstream daily through sources.json 2026-10-12 16:50:55 +02:00
module.nix treesiiter 2026-09-01 20:39:39 -04:00
package.nix ci: update upstream daily through sources.json 2026-10-12 16:50:55 +02:00
README.md ci: update upstream daily through sources.json 2026-10-12 16:50:55 +02:00
sources.json ci: update upstream daily through sources.json 2026-10-12 16:50:55 +02:00
update.sh ci: update upstream daily through sources.json 2026-10-12 16:50:55 +02:00

photogimp 3.1

A Nix flake for PhotoGIMP, the GIMP profile that rearranges the interface and keybindings to match Adobe Photoshop. All credit for PhotoGIMP itself goes to its authors; this repo is packaging only.

Usage

{
	inputs.photogimp.url = "git+https://git.cumsek.com/flakes/photogimp";
}

Import the home-manager module and turn it on:

{
	imports = [inputs.photogimp.homeModules.default];
	programs.photogimp.enable = true;
}

That installs GIMP and seeds its profile. Nothing else to wire up.

Options

Option Default Description
programs.photogimp.enable false Install GIMP and seed the PhotoGIMP profile.
programs.photogimp.package pkgs.gimp The GIMP to install. Set it to pin a different version — the profile directory follows whatever this resolves to.

Why a module and not a package

There is no packages output, on purpose. PhotoGIMP is not a program, it is a tree of config files, and GIMP only reads them from a writable $XDG_CONFIG_HOME/GIMP/<major.minor>. A package in home.packages would land in the profile under share/photogimp, where GIMP would never look at it.

Symlinking the tree in with xdg.configFile does not work either: GIMP rewrites gimprc, sessionrc, contextrc, toolrc and tool-options/* every time it exits, and those symlinks point into the read-only store. Pointing GIMP3_DIRECTORY at the store path fails for the same reason.

So the profile has to be copied into a directory GIMP owns, and copied only once — re-copying on every rebuild would silently throw away every preference and window layout change made since the last one. The module's activation script does that, guarded by a marker file. The marker names the PhotoGIMP version and sits in the GIMP series directory, so either bump re-seeds; delete ~/.config/GIMP/<gimp series>/.photogimp-<version> to force a reset.

Updating

.forgejo/workflows/update.yml runs daily (and on demand from the Actions tab): it updates flake.lock, points sources.json at the latest stable upstream release with update.sh (rewriting the version in this title to match), and pushes to main only if nix flake check still passes, which builds the profile. The lock and the PhotoGIMP bump land as separate commits.

By hand, the same thing is:

nix flake update
nix shell --inputs-from . nixpkgs#curl nixpkgs#jq -c ./update.sh
nix flake check -L

Version and hash live in sources.json. There is no package to build with a fake hash, so update.sh takes the hash from nix flake prefetch of the release tag, which matches what fetchFromGitHub computes.

Checks

nix flake check -L

Evaluates the module in a throwaway home-manager configuration, builds the profile and runs alejandra, deadnix, statix and shellcheck. CI runs the same command and nothing else.

Licence

The packaging is trivial; PhotoGIMP itself is GPL-3.0-or-later, as recorded in meta.license.