home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

wayland.nix (4782B)


      1 { config, lib, pkgs, nixosConfig, ... }:
      2 
      3 {
      4   home.pointerCursor = {
      5     gtk.enable = true;
      6     x11.enable = true;
      7     package = pkgs.qogir-icon-theme;
      8     name = "Qogir";
      9     size = 24;
     10   };
     11 
     12   programs = {
     13     kitty = {
     14       enable = true;
     15       # shellIntegration.enableZshIntegration = true;
     16       settings = {
     17         term = "xterm-256color";
     18         close_on_child_death = "yes";
     19         font_family = "JetBrains Mono";
     20         tab_bar_edge = "top";
     21         listen_on = "unix:/tmp/my kitty";
     22         allow_remote_control = "yes";
     23         macos_option_as_alt = "yes";
     24         copy_on_select = "yes";
     25 
     26         active_tab_foreground = "#C6A0F6";
     27         active_tab_background = "#0c0c0c";
     28         inactive_tab_foreground = "#6E738D";
     29         inactive_tab_background = "#0c0c0c";
     30       };
     31       font = {
     32         name = "JetBrains Mono";
     33         size = 12;
     34       };
     35       keybindings = {
     36         "shift+left" = "neighboring_window left";
     37         "shift+right" = "neighboring_window right";
     38         "shift+up" = "neighboring_window up";
     39         "shift+down" = "neighboring_window down";
     40       };
     41       theme = "Tango Light";
     42       # action_alias mkh kitten hints --alphabet asdfghjklqwertyuiopzxcvbnmASDFGHJKLQWERTYUIOPZXCVBNM 
     43       # map kitty_mod+n    mkh --type=linenum emacsclient -c -nw +{line} {path}
     44     };
     45   };
     46   services = {
     47     blueman-applet.enable = nixosConfig.modules.hardware.bluetooth.enable;
     48     pasystray.enable = nixosConfig.modules.hardware.audio.enable;
     49     udiskie.enable = true;
     50     # network-manager-applet.enable = true;
     51     gammastep = {
     52       enable = true;
     53       provider = "geoclue2";
     54       # longitude = "2.333333";
     55       # latitude = "48.866667";
     56     };
     57     kanshi = {
     58       enable = true;
     59       settings = [
     60         {
     61           profile.name = "home-undocked";
     62           profile.outputs = [
     63             # Output eDP-1 'AU Optronics 0xD291 Unknown'
     64             { criteria = "eDP-1"; status = "enable"; position = "0,0"; mode = "1920x1200"; scale = 1.0; }
     65           ];
     66         }
     67         {
     68           profile.name = "home-docked";
     69           profile.outputs = [
     70             # Old: Output eDP-1 'AU Optronics 0xD291 Unknown'
     71             # Output eDP-1 'Unknown 0xD291 Unknown'
     72             # Output DP-5 'LG Electronics LG ULTRAWIDE 0x0005D10C' (focused)
     73             # { criteria = "LG Electronics LG ULTRAWIDE 0x0000D50C"; status = "enable"; position = "0,0"; mode = "3440x1440"; scale = 1.0; }
     74             { criteria = "DP-5"; status = "enable"; position = "0,0"; mode = "3440x1440"; scale = 1.0; }
     75             # Use it as a "shareable" screen when needed
     76             { criteria = "eDP-1"; status = "enable"; position = "1460,1440"; mode = "1920x1200"; scale = 1.0; }
     77           ];
     78         }
     79       ];
     80     };
     81     mako = {
     82       enable = true;
     83       font = "JetBrains Mono 12";
     84       defaultTimeout = 8000; # 5s timeout
     85       groupBy = "app-name,summary";
     86       # FIXME: hide pulseaudio notifications (maybe they don't show up without pasystray)
     87       extraConfig = ''
     88 width=400
     89 on-button-left=dismiss
     90 on-button-middle=invoke-default-action
     91 on-button-right=dismiss
     92 border-radius=6
     93 border-size=3
     94 border-color=#db7508
     95 format=<b>%s</b>\n%b\n<i>%a</i>
     96 icon-path=/run/current-system/sw/share/icons/Qogir-dark:/run/current-system/sw/share/icons/hicolor
     97 
     98 [urgency=low]
     99 background-color=#282c30
    100 text-color=#888888
    101 default-timeout=2000
    102 
    103 [urgency=normal]
    104 background-color=#282c30
    105 text-color=#ffffff
    106 default-timeout=5000
    107 
    108 [urgency=high]
    109 background-color=#900000
    110 text-color=#ffffff
    111 border-color=#ff0000
    112 
    113 [app-name="pa-notify"]
    114 background-color=#0080ff
    115 text-color=#333333
    116 anchor=bottom-right
    117 format=<b>%s</b>\n%b
    118 
    119 [category="build"]
    120 anchor=bottom-right
    121 format=<b>%s</b>\n%b
    122 
    123 [category="recording"]
    124 anchor=bottom-right
    125 format=<b>%s</b>\n%b
    126 
    127 [category="info"]
    128 anchor=center
    129 format=<b>%s</b> %b
    130 
    131 #[app-name="Google Chrome" body~="calendar.google.com.*"]
    132 #max-visible=2
    133 
    134 [mode=do-not-disturb]
    135 invisible=1
    136       '';
    137     };
    138     swayidle = {
    139       enable = false;
    140       events = [
    141         { event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock --daemonize -i $HOME/desktop/pictures/lockscreen"; }
    142         { event = "lock"; command = "${pkgs.swaylock}/bin/swaylock --daemonize -i $HOME/desktop/pictures/lockscreen"; }
    143       ];
    144       timeouts = [
    145         { timeout = 600; command = "${pkgs.swaylock}/bin/swaylock --daemonize -i $HOME/desktop/pictures/lockscreen"; }
    146         {
    147           timeout = 1200;
    148           command = ''${pkgs.sway}/bin/swaymsg "output * dpms off"'';
    149           resumeCommand = ''${pkgs.sway}/bin/swaymsg "output * dpms on"'';
    150         }
    151       ];
    152     };
    153   };
    154   home.packages = with pkgs; [
    155     swaylock
    156     swayidle
    157     wf-recorder
    158     wl-clipboard
    159     wtype
    160     mako
    161     wofi
    162     slurp
    163     grim
    164     zenity
    165     qogir-icon-theme
    166     cliphist
    167   ];
    168 }