summary refs log tree commit diff stats
path: root/system/settings/programs/window-manager.nix
blob: 2e611b1df918546f1b2517ef915e7af04e08c135 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ config, pkgs, ... }:

{ services.xserver = {
   desktopManager.xterm.enable = false;

   displayManager = {
     lightdm = {
       enable = true;
       greeters.mini = {
         enable = true;
         user = "alan";
       };
     };
     sessionCommands = ''
       ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.xresources/main
       ${pkgs.xorg.xsetroot}/bin/xsetroot -cursor_name left_ptr -solid '#4d4d4c'
     '';
   };
    xautolock = {
      enable = true;
      locker = "${pkgs.i3lock}/bin/i3lock -n";
      enableNotifier = true;
      notifier = "${pkgs.libnotify}/bin/notify-send \"Locking in 10 seconds\"";
      time = 5;
    };
  };

  services.xserver.displayManager.setupCommands = ''
    ${pkgs.redshift}/bin/redshift \
      -l ${toString config.location.latitude}:${toString config.location.longitude} \
      -t ${toString config.services.redshift.temperature.day}:${toString config.services.redshift.temperature.night} \
      -b 1:1 \
      -o \
      -r
  '';

  environment.systemPackages = with pkgs; [
    dmenu
    libnotify # for notify-send
    xterm
    rofi
    sxhkd
    maim

    perlPackages.FileMimeInfo # xdg-utils uses this when no DE
  ];
}