summary refs log tree commit diff stats
path: root/system/settings/programs/window-manager.nix
blob: c3e89709d3c02a7ed715b749b5e634c4fdead167 (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
48
49
50
51
52
53
{ config, pkgs, ... }:

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

   displayManager = {
     autoLogin = {
       user = "alan";
       enable = false;
     };
     lightdm = {
       enable = true;
       greeter.enable = true;
       greeters.mini = {
         enable = false;
         user = "alan";
       };
     };
     sessionCommands = ''
       ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.xresources/main
       ${pkgs.xorg.xsetroot}/bin/xsetroot -cursor_name left_ptr -solid '#4d4d4c'
       ${pkgs.networkmanagerapplet}/bin/nm-applet &
     '';
   };
    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
  ];
}