1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 21:49:48 +01:00
home-manager/tests/modules/services/window-managers/sway/sway-post-2003.nix
Alex Rice 0869e23700
sway: set bar defaults to null
Allows fields of bar to be nullable and omit them from the generated
configuration if unset.

Fixes #1361
PR #1386
2020-08-26 00:05:05 +02:00

35 lines
929 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
home.stateVersion = "20.09";
wayland.windowManager.sway = {
enable = true;
package = pkgs.runCommandLocal "dummy-package" { } "mkdir $out" // {
outPath = "@sway";
};
# overriding findutils causes issues
config.menu = "${pkgs.dmenu}/bin/dmenu_run";
};
nixpkgs.overlays = [
(self: super: {
dummy-package = super.runCommandLocal "dummy-package" { } "mkdir $out";
dmenu = self.dummy-package // { outPath = "@dmenu@"; };
rxvt-unicode-unwrapped = self.dummy-package // {
outPath = "@rxvt-unicode-unwrapped@";
};
i3status = self.dummy-package // { outPath = "@i3status@"; };
})
];
nmt.script = ''
assertFileExists home-files/.config/sway/config
assertFileContent home-files/.config/sway/config \
${./sway-default.conf}
'';
};
}