- Nix 84.1%
- Shell 15.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Check / check (push) Successful in 44s
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> |
||
| .forgejo/workflows | ||
| .gitignore | ||
| alejandra.toml | ||
| flake.lock | ||
| flake.nix | ||
| module.nix | ||
| package.nix | ||
| README.md | ||
| sources.json | ||
| update.sh | ||
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.