mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 17:19:45 +01:00
25a9948361
- 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`.
45 lines
945 B
Nix
45 lines
945 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
i3 = {
|
|
ws1 = "1";
|
|
ws2 = "ABC";
|
|
ws3 = "3: Test";
|
|
ws4 = ''!"§$%&/(){}[]=?\*#<>-_.:,;²³'';
|
|
};
|
|
|
|
in {
|
|
imports = [ ./sway-stubs.nix ];
|
|
|
|
wayland.windowManager.sway = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage { outPath = "@sway@"; };
|
|
# overriding findutils causes issues
|
|
config.menu = "${pkgs.dmenu}/bin/dmenu_run";
|
|
|
|
config.workspaceOutputAssign = [
|
|
{
|
|
workspace = "${i3.ws1}";
|
|
output = "eDP";
|
|
}
|
|
{
|
|
workspace = "${i3.ws2}";
|
|
output = "DP";
|
|
}
|
|
{
|
|
workspace = "${i3.ws3}";
|
|
output = "HDMI";
|
|
}
|
|
{
|
|
workspace = "${i3.ws4}";
|
|
output = "DVI";
|
|
}
|
|
];
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/sway/config
|
|
assertFileContent $(normalizeStorePaths home-files/.config/sway/config) \
|
|
${./sway-workspace-output-expected.conf}
|
|
'';
|
|
}
|