feat(greetd): use hyprland instead of sway
This commit is contained in:
parent
50da06accf
commit
c37d0c057b
4 changed files with 90 additions and 41 deletions
|
@ -3,6 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./dracula-theme.nix
|
./dracula-theme.nix
|
||||||
|
./regreet.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
|
20
common/overlays/regreet.nix
Normal file
20
common/overlays/regreet.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.regreet = {
|
||||||
|
package = pkgs.greetd.regreet.overrideAttrs (self: super: rec {
|
||||||
|
version = "0.1.1-patched";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "rharish101";
|
||||||
|
repo = "ReGreet";
|
||||||
|
rev = "61d871a0ee5c74230dfef8100d0c9bc75b309203";
|
||||||
|
hash = "sha256-PkQTubSm/FN3FXs9vBB3FI4dXbQhv/7fS1rXkVsTAAs=";
|
||||||
|
};
|
||||||
|
cargoDeps = super.cargoDeps.overrideAttrs (_: {
|
||||||
|
inherit src;
|
||||||
|
outputHash = "sha256-dR6veXCGVMr5TbCvP0EqyQKTG2XM65VHF9U2nRWyzfA=";
|
||||||
|
});
|
||||||
|
|
||||||
|
# temp fix until https://github.com/rharish101/ReGreet/issues/32 is solved
|
||||||
|
patches = [./patches/regreet.patch];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,55 +1,85 @@
|
||||||
{ lib
|
{ lib
|
||||||
, pkgs
|
, pkgs
|
||||||
, config
|
, config
|
||||||
|
, hyprland
|
||||||
, ...
|
, ...
|
||||||
}: let
|
}: let
|
||||||
sway = "${config.programs.sway.package}/bin/sway";
|
regreetBin = "${lib.getExe config.programs.regreet.package}";
|
||||||
swayConf = pkgs.writeText "greetd-sway-config" ''
|
hyprBin = "${hyprland.packages.x86_64-linux.default}/bin";
|
||||||
exec "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP"
|
gset = pkgs.gsettings-desktop-schemas;
|
||||||
input "type:touchpad" {
|
|
||||||
tap enabled
|
css = pkgs.writeText "style.css" ''
|
||||||
|
window {
|
||||||
|
background-color: rgba(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
seat seat0 xcursor_theme Dracula-cursors 24
|
'';
|
||||||
xwayland disable
|
|
||||||
|
|
||||||
default_border none
|
paperConf = pkgs.writeText "hyprpaper.conf" ''
|
||||||
default_floating_border none
|
preload = ${pkgs.dracula-theme}/wallpapers/waves.png
|
||||||
font pango:monospace 0
|
wallpaper = eDP-1, ${pkgs.dracula-theme}/wallpapers/waves.png
|
||||||
titlebar_padding 1
|
'';
|
||||||
titlebar_border_thickness 0
|
|
||||||
|
|
||||||
exec "${lib.getExe config.programs.regreet.package} -l debug; swaymsg exit"
|
hyprConf = pkgs.writeText "greetd-hypr-config" ''
|
||||||
|
exec-once = hyprpaper --config ${paperConf}
|
||||||
|
|
||||||
|
input {
|
||||||
|
kb_layout = ca
|
||||||
|
kb_variant = multix
|
||||||
|
kb_model =
|
||||||
|
kb_options =
|
||||||
|
kb_rules =
|
||||||
|
|
||||||
|
follow_mouse = 1
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = yes
|
||||||
|
}
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
}
|
||||||
|
|
||||||
|
env = XCURSOR_SIZE,24
|
||||||
|
exec-once=hyprctl setcursor Dracula-cursors 24
|
||||||
|
|
||||||
|
misc {
|
||||||
|
disable_hyprland_logo = true
|
||||||
|
disable_splash_rendering = true
|
||||||
|
vfr = true
|
||||||
|
}
|
||||||
|
|
||||||
|
general {
|
||||||
|
border_size = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
decoration {
|
||||||
|
blur {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
drop_shadow = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# FIXME: kb doesn't work
|
||||||
|
env = XDG_DATA_DIRS, ${gset}/share/gsettings-schemas/${gset.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS
|
||||||
|
exec-once = squeekboard
|
||||||
|
exec-once = gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
|
||||||
|
|
||||||
|
exec-once = ${regreetBin} -s ${css}; ${hyprBin}/hyprctl dispatch exit
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = with pkgs; [
|
users.users.greeter = {
|
||||||
|
packages = with pkgs; [
|
||||||
dracula-theme
|
dracula-theme
|
||||||
flat-remix-icon-theme
|
flat-remix-icon-theme
|
||||||
|
hyprpaper
|
||||||
|
gtk3
|
||||||
|
glib
|
||||||
|
squeekboard
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# See overlay
|
||||||
programs.regreet = {
|
programs.regreet = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.greetd.regreet.overrideAttrs (self: super: rec {
|
|
||||||
version = "0.1.1-patched";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "rharish101";
|
|
||||||
repo = "ReGreet";
|
|
||||||
rev = "61d871a0ee5c74230dfef8100d0c9bc75b309203";
|
|
||||||
hash = "sha256-PkQTubSm/FN3FXs9vBB3FI4dXbQhv/7fS1rXkVsTAAs=";
|
|
||||||
};
|
|
||||||
cargoDeps = super.cargoDeps.overrideAttrs (_: {
|
|
||||||
inherit src;
|
|
||||||
outputHash = "sha256-dR6veXCGVMr5TbCvP0EqyQKTG2XM65VHF9U2nRWyzfA=";
|
|
||||||
});
|
|
||||||
|
|
||||||
# temp fix until https://github.com/rharish101/ReGreet/issues/32 is solved
|
|
||||||
patches = [./regreet.patch];
|
|
||||||
});
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
background = {
|
|
||||||
path = "${pkgs.dracula-theme}/wallpapers/waves.png";
|
|
||||||
fit = "Cover";
|
|
||||||
};
|
|
||||||
GTK = {
|
GTK = {
|
||||||
cursor_theme_name = "Dracula-cursors";
|
cursor_theme_name = "Dracula-cursors";
|
||||||
font_name = "Sans Serif";
|
font_name = "Sans Serif";
|
||||||
|
@ -59,13 +89,11 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.sway.enable = true;
|
|
||||||
|
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session = {
|
default_session = {
|
||||||
command = "${sway} --config ${swayConf}";
|
command = "${hyprBin}/Hyprland --config ${hyprConf}";
|
||||||
user = "greeter";
|
user = "greeter";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue