Summary Files Commits Branches @commit @diff @stats
path: root / services.nix
blob: 61b4cd589951c2e7a0b6bfc1a0de546ce8aa7940 (plain) (blame)
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
54
55
56
57
58
59

{ config, ... }:

{
  services = {
    upower.enable = true;
    tlp.enable = true;
    udisks2.enable = true; # gnome-disks disk access
    gnome.gnome-keyring.enable = true;
    gvfs.enable = true; # MTP (for nemo)

    logind.extraConfig = ''
      InhibitDelayMaxSec=2
      HoldoffTimeoutSec=1s
      HandlePowerKey=poweroff'';

    thinkfan = {
      enable = true;
      levels = [
        [0  0 35]
        [1 35 38]
        [3 38 53]
        ["level auto" 53 32767]
      ];
    };

    httpd = {
      enable = true;

      virtualHosts = {
        syndamiadotcom-local = {
          hostName = "synd.local";
          listen = [ { port = 80; } ];
          documentRoot = "/home/kamen/Programming/GitLab-repos/syndamiadotcom/website";
        };
      };
    };

    xserver = {
      enable = true;
      # xkbmap
      layout = "us,bg"; # TODO us,bg-custom
      xkbVariant = ",phonetic";
      xkbOptions = "grp:alt_shift_toggle,lv3:switch,caps:escape";
      # Window manager
      windowManager.openbox.enable = true;
      # touchpad support
      libinput.enable = true;
      libinput.touchpad.naturalScrolling = true;

      xautolock = {
        enable = true;
        time = 15;
        locker = "/home/kamen/.a/sys/lock.sh";
        extraOptions = [ "-detectsleep" "-lockaftersleep" "-secure" ];
      };
    };
  };
}