feat: switch to greetd
This commit is contained in:
parent
972bd0be04
commit
50da06accf
4 changed files with 101 additions and 7 deletions
|
@ -3,11 +3,11 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
../../modules/audio.nix
|
../../modules/audio.nix
|
||||||
|
../../modules/greetd
|
||||||
../../modules/kmscon.nix
|
../../modules/kmscon.nix
|
||||||
../../modules/plymouth.nix
|
../../modules/plymouth.nix
|
||||||
../../modules/printer.nix
|
../../modules/printer.nix
|
||||||
../../modules/proton-bridge.nix
|
../../modules/proton-bridge.nix
|
||||||
../../modules/sddm-wayland.nix
|
|
||||||
|
|
||||||
./modules/desktop.nix
|
./modules/desktop.nix
|
||||||
./modules/security.nix
|
./modules/security.nix
|
||||||
|
|
|
@ -7,16 +7,20 @@
|
||||||
sessionPackages = [
|
sessionPackages = [
|
||||||
hyprland.packages.x86_64-linux.default
|
hyprland.packages.x86_64-linux.default
|
||||||
];
|
];
|
||||||
defaultSession = "hyprland";
|
|
||||||
|
|
||||||
autoLogin = {
|
|
||||||
enable = true;
|
|
||||||
user = "matt";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
greetd = {
|
||||||
|
settings = {
|
||||||
|
initial_session = {
|
||||||
|
command = "${hyprland.packages.x86_64-linux.default}/bin/Hyprland";
|
||||||
|
user = "matt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
dbus.enable = true;
|
dbus.enable = true;
|
||||||
gvfs.enable = true;
|
gvfs.enable = true;
|
||||||
flatpak.enable = true;
|
flatpak.enable = true;
|
||||||
|
|
77
modules/greetd/default.nix
Normal file
77
modules/greetd/default.nix
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
{ lib
|
||||||
|
, pkgs
|
||||||
|
, config
|
||||||
|
, ...
|
||||||
|
}: let
|
||||||
|
sway = "${config.programs.sway.package}/bin/sway";
|
||||||
|
swayConf = pkgs.writeText "greetd-sway-config" ''
|
||||||
|
exec "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP"
|
||||||
|
input "type:touchpad" {
|
||||||
|
tap enabled
|
||||||
|
}
|
||||||
|
seat seat0 xcursor_theme Dracula-cursors 24
|
||||||
|
xwayland disable
|
||||||
|
|
||||||
|
default_border none
|
||||||
|
default_floating_border none
|
||||||
|
font pango:monospace 0
|
||||||
|
titlebar_padding 1
|
||||||
|
titlebar_border_thickness 0
|
||||||
|
|
||||||
|
exec "${lib.getExe config.programs.regreet.package} -l debug; swaymsg exit"
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dracula-theme
|
||||||
|
flat-remix-icon-theme
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.regreet = {
|
||||||
|
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 = {
|
||||||
|
background = {
|
||||||
|
path = "${pkgs.dracula-theme}/wallpapers/waves.png";
|
||||||
|
fit = "Cover";
|
||||||
|
};
|
||||||
|
GTK = {
|
||||||
|
cursor_theme_name = "Dracula-cursors";
|
||||||
|
font_name = "Sans Serif";
|
||||||
|
icon_theme_name = "Flat-Remix-Violet-Dark";
|
||||||
|
theme_name = "Dracula";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.sway.enable = true;
|
||||||
|
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = "${sway} --config ${swayConf}";
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# unlock GPG keyring on login
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||||
|
}
|
13
modules/greetd/regreet.patch
Normal file
13
modules/greetd/regreet.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/src/gui/component.rs b/src/gui/component.rs
|
||||||
|
index 692309c..f2fb9c0 100644
|
||||||
|
--- a/src/gui/component.rs
|
||||||
|
+++ b/src/gui/component.rs
|
||||||
|
@@ -371,7 +371,7 @@ impl AsyncComponent for Greeter {
|
||||||
|
if let Some(monitor) = &model.updates.monitor {
|
||||||
|
// The window needs to be manually fullscreened, since the monitor is `None` at widget
|
||||||
|
// init.
|
||||||
|
- root.fullscreen_on_monitor(monitor);
|
||||||
|
+ // root.fullscreen_on_monitor(monitor);
|
||||||
|
} else {
|
||||||
|
// Couldn't choose a monitor, so let the compositor choose it for us.
|
||||||
|
root.fullscreen();
|
Loading…
Reference in a new issue