-
Notifications
You must be signed in to change notification settings - Fork 51
/
greetd.nix
45 lines (42 loc) · 1.17 KB
/
greetd.nix
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
{
pkgs,
lib,
config,
...
}: let
homeCfgs = config.home-manager.users;
homeSharePaths = lib.mapAttrsToList (_: v: "${v.home.path}/share") homeCfgs;
vars = ''XDG_DATA_DIRS="$XDG_DATA_DIRS:${lib.concatStringsSep ":" homeSharePaths}" GTK_USE_PORTAL=0'';
gabrielCfg = homeCfgs.gabriel;
sway-kiosk = command: "${lib.getExe pkgs.sway} --unsupported-gpu --config ${pkgs.writeText "kiosk.config" ''
output * bg #000000 solid_color
xwayland disable
input "type:touchpad" {
tap enabled
}
exec '${vars} ${command}; ${pkgs.sway}/bin/swaymsg exit'
''}";
in {
users.extraUsers.greeter = {
# For caching and such
home = "/tmp/greeter-home";
createHome = true;
};
programs.regreet = {
enable = true;
iconTheme = gabrielCfg.gtk.iconTheme;
theme = gabrielCfg.gtk.theme;
font = gabrielCfg.fontProfiles.regular;
cursorTheme = {
inherit (gabrielCfg.gtk.cursorTheme) name package;
};
settings.background = {
path = gabrielCfg.wallpaper;
fit = "Cover";
};
};
services.greetd = {
enable = true;
settings.default_session.command = sway-kiosk (lib.getExe config.programs.regreet.package);
};
}