wayland: switch to ly from greetd
This commit is contained in:
parent
fac0cc86bd
commit
df9a4dbe34
3 changed files with 36 additions and 83 deletions
home/wayland
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [./services/greetd.nix];
|
||||
imports = [./services/ly.nix];
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
wayland
|
||||
|
@ -25,15 +25,14 @@
|
|||
TERMINAL = "wezterm";
|
||||
# SDL_VIDEODRIVER = "wayland";
|
||||
};
|
||||
etc."greetd/environments".text = ''
|
||||
Hyprland
|
||||
'';
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
config = {
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hyprlandGreetdConf = pkgs.writeText "hyprland-greetd-conf.conf" ''
|
||||
|
||||
monitor = HDMI-A-1,disable
|
||||
monitor = DP-2,disable
|
||||
monitor = DP-1,2560x1440@144, 0x0, auto
|
||||
monitor = DP-3,disable
|
||||
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
|
||||
exec-once = ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE
|
||||
exec-once = ${lib.getExe pkgs.greetd.regreet}; hyprctl dispatch exit
|
||||
exec-once = systemctl --user restart xdg-desktop-portal xdg-desktop-portal-hyprland
|
||||
|
||||
windowrulev2 = fullscreen, title:^regreet$
|
||||
windowrulev2 = move 0 0, title:^regreet$
|
||||
|
||||
$mainMod = SUPER
|
||||
bind = $mainMod, Q, exec, reboot
|
||||
bind = $mainMod, Return, exec, ${lib.getExe pkgs.greetd.regreet}
|
||||
|
||||
input {
|
||||
kb_layout = us
|
||||
follow_mouse = 1
|
||||
sensitivity = -0.5
|
||||
force_no_accel = true
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = false
|
||||
first_launch_animation = false
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
}
|
||||
|
||||
'';
|
||||
in {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "${lib.getExe inputs.hyprland.packages.${pkgs.system}.default} --config ${hyprlandGreetdConf}";
|
||||
user = "greeter";
|
||||
};
|
||||
default_session = initial_session;
|
||||
};
|
||||
};
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background.path = "/etc/greetd/frieren.png";
|
||||
env = {
|
||||
SESSION_DIRS = "/etc/greetd/environments";
|
||||
};
|
||||
terminal = {
|
||||
vt = 1;
|
||||
};
|
||||
commands = {
|
||||
reboot = ["systemctl" "reboot"];
|
||||
poweroff = ["systemctl" "poweroff"];
|
||||
};
|
||||
GTK = {
|
||||
application_prefer_dark_theme = true;
|
||||
theme_name = "Tokyonight-Dark-BL";
|
||||
icon_theme_name = "Papirus-Dark";
|
||||
cursor_theme_name = "Bibata-Modern-Classic";
|
||||
font_name = "Noto Sans 11";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
33
home/wayland/services/ly.nix
Normal file
33
home/wayland/services/ly.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# oneshot service to resize the main monitor
|
||||
systemd.services.fbset = {
|
||||
enable = true;
|
||||
wantedBy = ["multi-user.target"];
|
||||
unitConfig = {
|
||||
Description = "Framebuffer resolution";
|
||||
Before = "display-manager.service";
|
||||
};
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
Type = "oneshot";
|
||||
ExecStart = "${lib.getExe pkgs.fbset} -xres 2560 -yres 1440 -match --all";
|
||||
RemainAfterExit = "yes";
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
};
|
||||
};
|
||||
services.displayManager.ly = {
|
||||
enable = true;
|
||||
settings = {
|
||||
load = true;
|
||||
save = true;
|
||||
animation = "matrix";
|
||||
clear_password = true;
|
||||
vi_mode = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue