1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-26 19:59:47 +01:00
home-manager/tests/modules/services/window-managers/sway/sway-null-package.nix
oxalica 25a9948361
sway: import dbus env vars and explicitly specify them (#3031)
- Importing all environment variables is considered deprecated for
  `systemdctl import-environment`. The list of variables are picked
  from:
  https://github.com/swaywm/sway/wiki/Systemd-integration#managing-user-applications-with-systemd

  The `XDG_CURRENT_DESKTOP` is said to be required for portals, see:
  https://github.com/nix-community/home-manager/pull/2385#issuecomment-1026454162

- DBus activation environment should also be updated. Otherwise, DBus
  activated programs, without a coresponding systemd service, cannot get a
  correct environment and would fail, eg. `mako`.
2022-07-07 11:03:58 -06:00

27 lines
693 B
Nix

{ config, lib, pkgs, ... }:
{
imports = [ ./sway-stubs.nix ];
# Enables the default bar configuration
home.stateVersion = "20.09";
wayland.windowManager.sway = {
enable = true;
package = null;
config.menu = "${pkgs.dmenu}/bin/dmenu_run";
};
assertions = [{
assertion =
!lib.elem config.wayland.windowManager.sway.config.bars [ [ { } ] [ ] ];
message =
"The default Sway bars configuration should be set for this test (sway-null-package) to work.";
}];
nmt.script = ''
assertFileExists home-files/.config/sway/config
assertFileContent $(normalizeStorePaths home-files/.config/sway/config) \
${./sway-null-package.conf}
'';
}