51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
{
|
|
config
|
|
, lib
|
|
, sway, mako
|
|
}:
|
|
|
|
{
|
|
environment.systemPackages = [ sway ];
|
|
|
|
home-manager.users."${config.system.singleUser}" = {
|
|
wayland.windowManager.sway = {
|
|
enable = true;
|
|
config = rec {
|
|
startup = [
|
|
{ command = "${mako}/bin/mako --default-timeout=3000"; }
|
|
];
|
|
modifier = "Mod1";
|
|
gaps = {
|
|
inner = 5;
|
|
outer = 7;
|
|
};
|
|
input = {
|
|
* = { xkb_layout = "de"; };
|
|
"2:7:SynPS/2_Synaptics_TouchPad" = {
|
|
tap = "enabled";
|
|
natural_scroll = "disabled";
|
|
dwt = "enabled";
|
|
};
|
|
"2:10:TPPS/2_Elan_TrackPoint" = { dwt = "enabled"; };
|
|
};
|
|
output = {
|
|
* = { adaptive_sync = "on"; };;
|
|
};
|
|
keybindings = lib.mkOptionDefault let
|
|
speakers = "alsa_output.pci-0000_00_1f.3.analog-stereo";
|
|
in {
|
|
"${modifier}+Return" = "exec alacritty";
|
|
"${modifier}+e" = "exec emacs";
|
|
"${modifier}+Shift+q" = "kill";
|
|
"${modifer}+f" = "exec firefox";
|
|
"F1" = "exec pactl set-sink-volume ${speakers} toggle";
|
|
"F2" = "exec pactl set-sink-volume ${speakers} -10%";
|
|
"F3" = "exec pactl set-sink-volume ${speakers} +10%";
|
|
"F5" = "exec brightnessctl --device=intel_backlight set 10%-";
|
|
"F6" = "exec brightnessctl --device=intel_backlight set +10%";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|