mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-07-06 16:12:33 +02:00
getting back to tuigreet
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
../../nixos/home-manager.nix
|
../../nixos/home-manager.nix
|
||||||
../../nixos/nix.nix
|
../../nixos/nix.nix
|
||||||
../../nixos/systemd-boot.nix
|
../../nixos/systemd-boot.nix
|
||||||
../../nixos/sddm.nix
|
../../nixos/tuigreet.nix
|
||||||
../../nixos/users.nix
|
../../nixos/users.nix
|
||||||
../../nixos/utils.nix
|
../../nixos/utils.nix
|
||||||
../../nixos/hyprland.nix
|
../../nixos/hyprland.nix
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
c = config.lib.stylix.colors;
|
||||||
|
|
||||||
|
theme = lib.concatStringsSep ";" [
|
||||||
|
"border=#${c.base0D}"
|
||||||
|
"text=#${c.base05}"
|
||||||
|
"prompt=#${c.base0D}"
|
||||||
|
"action=#${c.base0C}"
|
||||||
|
"button=#${c.base0D}"
|
||||||
|
"container=#${c.base00}"
|
||||||
|
"input=#${c.base02}"
|
||||||
|
];
|
||||||
|
|
||||||
|
tuigreet-launch = pkgs.writeShellScript "tuigreet-launch" ''
|
||||||
|
exec ${pkgs.tuigreet}/bin/tuigreet \
|
||||||
|
--time \
|
||||||
|
--time-format '%H:%M %A %d %B' \
|
||||||
|
--sessions /run/current-system/sw/share/wayland-sessions \
|
||||||
|
--remember \
|
||||||
|
--remember-user-session \
|
||||||
|
--asterisks \
|
||||||
|
--greeting ' Welcome' \
|
||||||
|
--container-padding 2 \
|
||||||
|
--theme '${theme}' \
|
||||||
|
--power-shutdown 'systemctl poweroff' \
|
||||||
|
--power-reboot 'systemctl reboot'
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = "${tuigreet-launch}";
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# this is a life saver.
|
||||||
|
# literally no documentation about this anywhere.
|
||||||
|
# might be good to write about this...
|
||||||
|
# https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/
|
||||||
|
systemd.services.greetd.serviceConfig = {
|
||||||
|
Type = "idle";
|
||||||
|
StandardInput = "tty";
|
||||||
|
StandardOutput = "tty";
|
||||||
|
StandardError = "journal"; # Without this errors will spam on screen
|
||||||
|
# Without these bootlogs will spam on screen
|
||||||
|
TTYReset = true;
|
||||||
|
TTYVHangup = true;
|
||||||
|
TTYVTDisallocate = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [pkgs.tuigreet];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user