add greetd module
This commit is contained in:
parent
d0dc70b011
commit
48810564b1
5 changed files with 46 additions and 3 deletions
|
@ -1,8 +1,5 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./waybar.nix
|
||||
];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
modules.gnome.enable = true;
|
||||
modules.nvidia.enable = true;
|
||||
modules.gaming.enable = true;
|
||||
|
||||
|
|
|
@ -22,5 +22,6 @@
|
|||
};
|
||||
};
|
||||
modules.hyprland.enable = true;
|
||||
modules.greetd.enable = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,5 +8,6 @@ _:
|
|||
./gaming.nix
|
||||
./stylix.nix
|
||||
./hyprland.nix
|
||||
./greetd.nix
|
||||
];
|
||||
}
|
||||
|
|
43
modules/greetd.nix
Normal file
43
modules/greetd.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ inputs, config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.modules.greetd;
|
||||
|
||||
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
|
||||
greeter = lib.getExe config.programs.regreet.package;
|
||||
Hyprland = lib.getExe' hyprland "Hyprland";
|
||||
hyprctl = lib.getExe' hyprland "hyprctl";
|
||||
hyprlandConfig = pkgs.writeText "greetd-hyprland-config" ''
|
||||
misc {
|
||||
force_default_wallpaper=0
|
||||
focus_on_activate=1
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled=0
|
||||
first_launch_animation=0
|
||||
}
|
||||
|
||||
exec-once=${greeter}; ${hyprctl} dispatch exit
|
||||
exec-once=${hyprctl} dispatch focuswindow ${greeter}
|
||||
'';
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.greetd = {
|
||||
enable = lib.mkEnableOption "Enable the greetd module";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.regreet.enable = true;
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "${Hyprland} --config ${hyprlandConfig}";
|
||||
user = "nezia";
|
||||
};
|
||||
default_session = initial_session;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue