- Implicitly disable checkConfig when `cfg.package = null` as we don’t
have any exe to use for the check
- Implicitly disable `swaymsg reload` on activation, since we have no
exe to use for running it
See https://github.com/nix-community/home-manager/issues/5307
Sometimes services can fail. Failed services will generally not be
restarted by systemd. To start previously failed services we can
just reset their failed state before starting our session target.
GNOME and Plasma do the same thing.
See: https://github.com/alebastr/sway-systemd/pull/11
Helps avoid successful build but Sway failing to start.
To meaningfully test this, I had to actually use `pkgs.sway` in the
test rather than the stub, but left all other tests using the stub and
changed them to skipping the test.
We need to pass `--unsupported-gpu` as Sway checks for `nvidia` in
`/proc/modules`, and the Nix sandbox has `/proc/modules` available.
workspace 10 is part of upstream's default config, but was missing in home-manager.
The initial "sway: add module" PR (02d6040003) went through multiple iterations and had workspace 10 included for a brief moment.
Until the author removed it in a force-push commenting
> Have removed the last change which added bound ${modifer}+0 to workspace number 10 as this messed up workspace numbering in sway.
The reason might have been, that sway used to sort the workspaces in the order they appeared in the config.
Attribute sets in nix are sorted, but not "naturally sorted", meaning `bindsym Mod1+0 workspace number 10` comes before `bindsym Mod1+0 workspace number 1`.
It's unclear if that's what really happened. A workaround would have been to use `lib.lists.naturalSort` in `keybindingsStr`.
But I cannot reproduce this anymore in any way.
I assume this has been fixed many years ago by now.
upstream config: 020a572ed6/config.in (L113-L134)
DBus activated services such as mako use the XCURSOR_THEME and
XCURSOR_SIZE environment variables to decide how to show the cursor,
so without these, the cursor may not match the rest of the desktop
when hovering over (in this example) mako notification surfaces.
Fixesnix-community/home-manager#4488
The default config for sway generates a bar block with tray_output primary. But wayland (or sway, take your pick?) has no concept of a primary display so this just results in no tray anywhere.
A better default is "*" which puts the tray on every monitor, since sway can do so without issue.
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
These (and the `*MD` functions apart from `literalMD`) are now no-ops
in nixpkgs and serve no purpose other than to add additional noise and
potentially mislead people into thinking unmarked DocBook documentation
will still be accepted.
Note that if backporting changes including documentation to 23.05,
the `mdDoc` calls will need to be re-added.
To reproduce this commit, run:
$ NIX_PATH=nixpkgs=flake:nixpkgs/e7e69199f0372364a6106a1e735f68604f4c5a25 \
nix shell nixpkgs#coreutils \
-c find . -name '*.nix' \
-exec nix run -- github:emilazy/nix-doc-munge/98dadf1f77351c2ba5dcb709a2a171d655f15099 \
--strip {} +
$ ./format
This process was automated by [my fork of `nix-doc-munge`]. All
conversions were automatically checked to produce the same DocBook
result when converted back, modulo minor typographical/formatting
differences on the acceptable-to-desirable spectrum.
To reproduce this commit, run:
$ NIX_PATH=nixpkgs=flake:nixpkgs/e7e69199f0372364a6106a1e735f68604f4c5a25 \
nix shell nixpkgs#coreutils \
-c find . -name '*.nix' \
-exec nix run -- github:emilazy/nix-doc-munge/98dadf1f77351c2ba5dcb709a2a171d655f15099 \
{} +
$ ./format
[my fork of `nix-doc-munge`]: https://github.com/emilazy/nix-doc-munge/tree/home-manager
The NixOS variant of Markdown doesn't make a distinction between
`<code>` and `<literal>` or `<quote>` and... quotes, and doesn't
support `<parameter>` or `<replaceable>`. These are infrequently used
(apart from `<code>`) and don't add much, so just convert them to
simpler forms to allow the options containing them to be converted
to Markdown automatically.
A few minor syntactic adjustments were also made to make
`nix-doc-munge`'s job easier.
`nix-doc-munge` can't handle these, which is understandable as I can
barely handle them either. There are a few infelicities here: the
current processor can't handle multiple terms to one description in
a description list so they get comma-separated in one case, and one
case that should ideally render as a `<figure>` with a `<figcaption>`
in HTML is reduced to a paragraph with some `<strong>` text. (Which, in
fairness, is how it rendered in practice with the DocBook anyway.) The
docs generator has since been updated to handle figures, but we can't
use it until moving off DocBook output.
* sway: add support for XDG autostart using systemd
Using the option wayland.windowManager.sway.systemd.xdgAutostart, users
can now choose to start applications present in
$XDG_CONFIG_HOME/autostart when starting their sway session.
This change also renames wayland.windowManager.sway.systemdIntegration
to wayland.windowManager.sway.systemd.enable;
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
* sway: add Scrumplex to maintainers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
---------
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Without this, even if you configure a preference for Electron apps to
use Ozone by setting `NIXOS_OZONE_WL=1`, GUI apps launched through
systemd user services use XWayland, since the variable is not set in
their environment.
This fixes that issue by importing it, like we do other variables.
- The `XDG_SESSION_TYPE` environment variable is used by some applications and frameworks to
detect wayland sessions (i.e qt5/6, electron/chromium). It is set by wlroots since version 0.13.0 [1].
- Propagating `XDG_SESSION_TYPE` to the systemd user environment is necessary when processes launched by
services (e.g emacs) need to inherit the environment variable.
[1] - 90c8452959
Constrain the pgrep command to only return results for the current user.
Additionally, quote the socket variables to prevent splitting.
Previously, if multiple users on a system were running `sway`, the
`pgrep` used in finding `swaySocket` would return multiple results. As a
result, reloads of sway would fail.
Fixes#2912.
This would give the error "attempt to call something which is not a
function but a list" given that `optionals a b` returns a list. `indent`
is the one taking this empty set as second argument.