90 lines
2.2 KiB
Nix
90 lines
2.2 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
rosePineHyprcursor = pkgs.callPackage ../../home-manager/hyprland/rose-pine-hyprcursor.nix { };
|
|
toLua = lib.generators.toLua { };
|
|
monitorConf = lib.concatMapStrings (
|
|
m: "hl.monitor(${toLua m})\n"
|
|
) config.cornflake.greeter.monitors;
|
|
hyprGreetConf = pkgs.writeText "hyprland-greetd.lua" ''
|
|
${monitorConf}
|
|
hl.env("HYPRCURSOR_THEME", "rose-pine-hyprcursor")
|
|
hl.env("HYPRCURSOR_SIZE", "24")
|
|
hl.env("XCURSOR_SIZE", "24")
|
|
|
|
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
|
|
hl.env("XDG_SESSION_TYPE", "wayland")
|
|
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
|
|
|
|
hl.config({
|
|
general = {
|
|
border_size = 0,
|
|
},
|
|
animations = {
|
|
enabled = false,
|
|
},
|
|
misc = {
|
|
force_default_wallpaper = false,
|
|
disable_hyprland_logo = true,
|
|
disable_splash_rendering = true,
|
|
},
|
|
})
|
|
|
|
hl.on("hyprland.start", function()
|
|
hl.exec_cmd("${
|
|
config.programs.regreet.package or pkgs.regreet
|
|
}/bin/regreet; hyprctl dispatch exit")
|
|
end)
|
|
'';
|
|
in
|
|
{
|
|
options.cornflake.greeter.monitors = lib.mkOption {
|
|
type = lib.types.listOf lib.types.attrs;
|
|
default = [ ];
|
|
description = "greetd セッション用 Hyprland の Lua monitor 設定";
|
|
};
|
|
|
|
config = {
|
|
services.greetd.enable = true;
|
|
services.greetd.settings.default_session = {
|
|
command = "${pkgs.hyprland}/bin/start-hyprland -- -c ${hyprGreetConf}";
|
|
user = "greeter";
|
|
};
|
|
|
|
environment.systemPackages = [
|
|
rosePineHyprcursor
|
|
];
|
|
|
|
programs.regreet = {
|
|
# greetd を Hyprland で動かす
|
|
enable = true;
|
|
theme.name = "Adwaita-dark";
|
|
iconTheme.name = "Papirus-Dark";
|
|
cursorTheme.name = "Bibata-Modern-Ice";
|
|
settings = {
|
|
appearance = {
|
|
greeting_msg = "Welcome back!";
|
|
};
|
|
widget = {
|
|
clock = {
|
|
format = "%H:%M";
|
|
resolution = "100ms";
|
|
timezone = "Asia/Tokyo";
|
|
label_width = 150;
|
|
};
|
|
};
|
|
GTK = {
|
|
application_prefer_dark_theme = true;
|
|
};
|
|
background = {
|
|
path = "/usr/share/wallpaper/arknights-image-01.png";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|