nixos/home/desktop/sway.nix

61 lines
1.6 KiB
Nix

{
pkgs,
lib,
config,
...
}: let
modifier = config.wayland.windowManager.sway.config.modifier;
term = config.wayland.windowManager.sway.config.terminal;
in {
imports = [
./swaylock.nix
# ./eww.nix
./waybar.nix
./gtk.nix
./dunst.nix
./rofi.nix
];
home.packages = with pkgs; [
pipewire
wireplumber
wl-clipboard
swayimg
hyprpaper
brightnessctl
];
programs.rofi.package = pkgs.rofi-wayland;
wayland.windowManager.sway = {
enable = true;
config = {
input."*".xkb_layout = "gb";
output."*".bg = "~/nixos/wallpaper.jpg fill";
fonts = {
names = ["FiraCode Nerd Font" "FiraCode Nerd Font Mono"];
size = 12.0;
};
gaps = {
inner = lib.mkDefault 5;
outer = lib.mkDefault 20;
};
bars = [];
startup = [{command = "dunst";} {command = "waybar";}];
modifier = lib.mkDefault "Mod4";
terminal = lib.mkDefault "${pkgs.wezterm}/bin/wezterm";
keybindings = lib.mkOptionDefault {
"${modifier}+Return" = "exec ${term}";
"${modifier}+q" = "kill";
"${modifier}+e" = "exec power-profiles";
"${modifier}+p" = "exec powermenu";
"${modifier}+v" = "floating toggle";
"${modifier}+space" = "exec ${pkgs.rofi}/bin/rofi -show drun";
# "${modifier}+F1" = "exec ${pkgs.swaylock}/bin/swaylock";
"${modifier}+w" = "exec ${pkgs.firefox}/bin/firefox";
"${modifier}+f" = "exec ${pkgs.xfce.thunar}/bin/thunar";
"${modifier}+m" = "fullscreen toggle";
"${modifier}+c" = "scratchpad show";
"${modifier}+Shift+c" = "move scratchpad";
};
};
};
}