summaryrefslogtreecommitdiff
path: root/hosts/sif/greetd/default.nix
blob: f609fc054eb7befae7e3d522e3f6b0920df32e34 (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
{ pkgs, ... }:
{
  config = {
    services.greetd = {
      enable = true;
    #   settings.default_session.command = let
    #     cfg = config.programs.regreet;
    #   in pkgs.writeShellScript "greeter" ''
    #       modprobe -r nvidia_drm

    #       exec ${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package}
    #     '';
    };
    programs.regreet = {
      enable = true;
      theme = {
        package = pkgs.equilux-theme;
        name = "Equilux-compact";
      };
      iconTheme = {
        package = pkgs.paper-icon-theme;
        name = "Paper-Mono-Dark";
      };
      font = {
        package = pkgs.fira;
        name = "Fira Sans";
        # size = 6;
      };
      cageArgs = [ "-s" "-m" "last" ];
      settings = {
        GTK.application_prefer_dark_theme = true;
        widget.clock.format = "%F %H:%M:%S%:z";
        background = {
          path = pkgs.runCommand "wallpaper.png" {
            buildInputs = with pkgs; [ imagemagick ];
          } ''
            magick ${./wallpaper.png} -filter Gaussian -resize 6.25% -define filter:sigma=2.5 -resize 1600% "$out"
          '';
          fit = "Cover";
        };
      };
    };
  };
}