summary refs log tree commit diff stats
path: root/system/settings/programs/window-manager.nix
blob: 82799adc7fe445491a22a83828272a37b1b998cd (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 = true;
     };
     lightdm = {
       enable = true;
       greeter.enable = false;
       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
  ];
}