aboutsummaryrefslogblamecommitdiff
path: root/users/fcuny/desktop/sway/default.nix
blob: 2836ed13797f271031d2bd79c3463aa5e87a223c (plain) (tree)
1
2
3
4
5
6
7
8


                           
             

                   
              
                   



                    
            
                    
             


                           
                               

                                 








                                                                      
                 



                                      
               
               


                                                                    



                


                        


      
{ config, lib, pkgs, ... }:

{
  imports = [
    ./waybar.nix
    ./sway-idle.nix
    ./wofi.nix
    ./gammastep.nix
  ];

  home.packages = [
    pkgs.pavucontrol
    pkgs.wev
    pkgs.wf-recorder
    pkgs.wofi
  ];

  home.sessionVariables = {
    LIBSEAT_BACKEND = "logind";
    MOZ_ENABLE_WAYLAND = true;
    XDG_CURRENT_DESKTOP = "sway";
  };

  wayland.windowManager.sway = {
    enable = true;
    systemdIntegration = true;
    config = rec {
      modifier = "Mod4";
      terminal = "${config.programs.alacritty.package}/bin/alacritty";
      menu = "${pkgs.wofi}/bin/wofi -S run";
      bars = [ ];
      fonts = {
        names = [ "Source Code Pro" ];
        size = 10.0;
      };
      input = {
        "*" = {
          "xkb_layout" = "us,fr";
          # map capslock to ctrl, and switch layout using shift+caps
          "xkb_options" = "ctrl:nocaps,grp:shift_caps_toggle";
        };
      };
      output = {
        "*" = {
          scale = "1.5";
        };
      };
    };
  };
}