Migrate aspi host config
This commit is contained in:
49
hosts/common/optional/greetd.nix
Normal file
49
hosts/common/optional/greetd.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
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'';
|
||||
|
||||
julianCfg = homeCfgs.julian;
|
||||
|
||||
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 = julianCfg.gtk.iconTheme;
|
||||
theme = julianCfg.gtk.theme;
|
||||
font = julianCfg.fontProfiles.regular;
|
||||
cursorTheme = {
|
||||
inherit (julianCfg.gtk.cursorTheme) name package;
|
||||
};
|
||||
settings.background = {
|
||||
path = julianCfg.wallpaper;
|
||||
fit = "Cover";
|
||||
};
|
||||
};
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings.default_session.command = sway-kiosk (lib.getExe config.programs.regreet.package);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user