~cyplo/dotfiles

ref: 0f34b9d1bf61e8be3e61351814603e01c8bf42cd dotfiles/nixos/common-services.nix -rw-r--r-- 1.3 KiB
0f34b9d1 — Cyryl Płotnicki upgrade rust-analyzer 5 months ago
                                                                                
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
60
61
62
63
64
65
66
{ config, pkgs, ... }:
{
  systemd.services.promtail = {
    description = "Promtail service for Loki";
    after =  [ "zerotierone.service" "network.target" ];
    requires = [ "zerotierone.service" "network.target" ];
    wants = [ "zerotierone.service" "network.target" ];

    wantedBy = [ "multi-user.target" ];

    serviceConfig = {
      ExecStart = ''
          ${pkgs.grafana-loki}/bin/promtail --config.file ${./promtail.yaml}
      '';
    };
  };

  services = {
    udev.packages = [ pkgs.android-udev-rules ];
    ratbagd.enable = true;

    fwupd = {
      enable = true;
      package = pkgs.fwupd;
    };

    tlp = {
      enable = true;
      settings = {
        "DISK_IOSCHED" = "mq-deadline";
      };
    };

    upower.enable = true;
    fstrim.enable = true;
    clipmenu.enable = true;
    lorri.enable = true;
    keybase.enable=true;

    avahi = {
      enable = true;
      nssmdns = true;
    };

    geoclue2.enable = true;
    xserver = {
      enable = true;
      layout = "pl";
      xkbOptions = "caps:ctrl_modifier";
      libinput = {
        enable = true;
        naturalScrolling = false;
        clickMethod = "clickfinger";
        disableWhileTyping = true;
      };

      useGlamor = true;

      deviceSection = ''
          Option "TearFree" "true"
          Option "AccelMethod" "sna"
      '';

    };
  };
}