Add optional gtk3 support to Awesome so that the `beautiful.gtk` module can be
used.
The `beautiful.gtk` uses `lgi` to obtain Gtk via gobject-introspect:
return require('lgi').Gtk
Since the current build does not include the typelib files needed, the above
call fails.
It turns out that both `gtk3` and `atk` (Accessibility toolkit) are needed, so
this commit adds them as optional build inputs.
Setting `gtk3Support` to `true` e.g. in an overlay will make `beautiful.gtk`
work at the cost of an increased closure size (currently 99.6M vs 223.4M).
Fixes https://github.com/NixOS/nixpkgs/issues/60538
Using wrapProgram makes so that the generated "awesome" wrapper duplicates its
command line options at every restart.
As @psychon puts it:
> AwesomeWM restarts via execvp(argv[0], argv). In NixOS, wrapProgram is used
> to generate a wrapper around the real binary. wrapProgram calls makeWrapper
> with --argv0 '$0'. I guess this is what makes awesomeWM run the wrapper again
> on restart. Without this --argv0 awesomeWM would directly restart itself
> instead of the wrapper, I think.
This package should only install the xmonad manpage but not GHC's (it
doesn't even install GHC in the path). Installing both manpages makes
this package conflict with the GHC derivation.
Fixes#60914
This change will load all configuration files from /etc, to make it easy
to override them, but fallback to /nix/store/.../etc/sway/config to make
Sway work out-of-the-box with the default configuration on non NixOS
systems.
This commit partly reinstates changes from 5465d6f that had been somehow
reverted in 17d3eb2. Also, a comment has been added in the hope that future
changes won't do the same.
Additionally, refactor the LUA_PATH env var to ensure that the internal lgi lua
files can't be required explicitly and to avoid possible name clashes (this
fixes issue #60232).
Finally, rather than using prepending `?.lua` append `;;` to LUA_PATH. Quoting
@psychon:
> This is interpreted by Lua as "add the default search path here" (which does
> indeed contain ?.lua, but also contains more).
Testing done:
- Build with `nix-build -I /path/to/repo -A awesome`
- Start an X session with xterm only
- Start xephyr, e.g. `Xephyr :1 -name xephyr -screen 512x384 -ac -br -noreset &`
- Run awesome like `DISPLAY=:1.0 ./result/bin/awesome`. Additionally, add
`--search` options to expose lua modules that have a name clash with lgi's
internal ones (see #60232 for more details) and `require` them in `rc.lua` to
prove that they are loaded correctly
This commit contains the following changes:
- nixos/sway: Remove the beta references
- sway: Drop buildDocs
- nixos/sway: Improve the documentation
- sway,nixos/sway: Adapt Sway to NixOS
- Copy the default configuration file to /etc/sway/config (Sway will
still load the identical file from the Nix store but this makes it
easier to copy the default configuration file).
- This will also remove all references to the Nix store from the
default configuration file as they will eventually be garbage
collected which is a problem if the user copies it.
- I've also decided to drop the default wallpaper (alternatively we
could copy it to a fixed location).
- nixos/sway: Drop the package option
This is the result of executing:
git mv -f pkgs/applications/window-managers/sway/beta.nix pkgs/applications/window-managers/sway/default.nix
git mv -f nixos/modules/programs/sway-beta.nix nixos/modules/programs/sway.nix
And removing sway-beta from the following files:
pkgs/top-level/all-packages.nix
nixos/modules/module-list.nix