{ config, pkgs, lib, ... }: let user = "tzlil"; users.users.greeter.packages = [pkgs.sway]; greet = "${pkgs.greetd.gtkgreet.out}/bin/gtkgreet -l -s ${pkgs.writeText "gtkgreet.css" " window { background-image: url(\"${pkgs.fetchurl { url = "https://i.imgur.com/D6qCaQG.png"; sha256 = "sha256-Yt5JxmqN6++76cWu8EI/gsmelsJT/3jvLxyeRASQUhI="; }}\"); background-size: cover; background-position: center; color: white; } box#body { background-color: rgba(50, 50, 50, 0.8); border-radius: 40px; padding: 50px; } # log in text .text-button { color: white; } "}"; kiosk = command: "${pkgs.cage.out}/bin/cage -- ${command}"; in { options.greeter.initialSession = lib.mkOption { type = lib.types.str; default = "${pkgs.sway.out}/bin/sway"; }; config = { environment.etc."greetd/environments".text = "sway\n" + "$SHELL -l\n"; services.greetd = { enable = true; settings = { default_session = { inherit user; command = kiosk "${greet} -l &>/dev/null"; }; initial_session = { inherit user; command = config.greeter.initialSession; }; }; }; }; }