27 lines
533 B
Nix
27 lines
533 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.sway;
|
|
in
|
|
{
|
|
config = lib.mkIf cfg.enable {
|
|
systemd.user.services.sway-sync-xkbmap = {
|
|
Unit = {
|
|
Description = "Sync xkbmap with sway keyboard layout";
|
|
PartOf = [ "graphical-session.target" ];
|
|
After = [ "graphical-session.target" ];
|
|
};
|
|
Service = {
|
|
ExecStart = lib.getExe pkgs.sway-sync-xkbmap;
|
|
Restart = "on-failure";
|
|
};
|
|
Install = {
|
|
WantedBy = [ "sway-session.target" ];
|
|
};
|
|
};
|
|
};
|
|
}
|