summaryrefslogtreecommitdiff
path: root/modules/login.nix
blob: 0789cff6382d02f33d5100a15b54bf4089cdcc5d (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
{ pkgs, ... }:

{
  environment.systemPackages = with pkgs; [
    greetd.tuigreet
    greetd.greetd
  ];

  services.greetd = {
    enable = true;
    settings = {
      default_session = {
        # command = "tuigreet --time --remember --cmd \"startplasma-wayland\"";
        command = "tuigreet --time --remember --cmd \"dwl -s dwlb\"";
        user = "greeter";
      };
    };
  };

  services.logind.extraConfig = ''
    HandlePowerKey=ignore
  '';

  systemd.services.greetd.serviceConfig = {
    Type = "idle";
    StandardInput = "tty";
    StandardOutput = "tty";
    StandardError = "journal";
    TTYReset = true;
    TTYVHangup = true;
    TTYVTDisallocate = true;
  };

  security.polkit.enable = true;

  security.pam.services.swaylock.text = ''
    auth include login
  '';

  services.libinput.enable = true;

  programs.gnupg.agent = {
    enable = true;
  };

  programs.dconf.enable = true;

  environment.sessionVariables = {
    __EGL_VENDOR_LIBRARY_FILENAMES = "${pkgs.mesa.drivers.outPath}/share/glvnd/egl_vendor.d/50_mesa.json";
    __GLX_VENDOR_LIBRARY_NAME = "mesa";
  };
}