forked from poz/niksos
clean up greetd config
This commit is contained in:
parent
639fa4e14f
commit
291745d331
2 changed files with 40 additions and 33 deletions
|
@ -3,23 +3,7 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||
# https://github.com/swaywm/sway/issues/5732#issuecomment-1583336383
|
||||
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
|
||||
exec hash dbus-update-activation-environment 2>/dev/null && \
|
||||
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
|
||||
|
||||
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
|
||||
bindsym Mod4+shift+e exec swaynag \
|
||||
-t warning \
|
||||
-m 'What do you want to do?' \
|
||||
-b 'Poweroff' 'systemctl poweroff' \
|
||||
-b 'Reboot' 'systemctl reboot'
|
||||
'';
|
||||
in
|
||||
{
|
||||
}: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [ inputs.nur.overlay ];
|
||||
|
||||
|
@ -128,25 +112,9 @@ in
|
|||
CARGO_HOME = "\${XDG_DATA_HOME}/cargo";
|
||||
GTK2_RC_FILES = "\${XDG_CONFIG_HOME}/gtk-2.0/gtkrc";
|
||||
};
|
||||
etc = {
|
||||
"greetd/environments".text = ''
|
||||
Hyprland
|
||||
zsh
|
||||
shutdown now
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||||
user = "jacek";
|
||||
};
|
||||
};
|
||||
};
|
||||
blueman.enable = true;
|
||||
mullvad-vpn.enable = true;
|
||||
|
||||
|
|
39
hosts/niks/greetd.nix
Normal file
39
hosts/niks/greetd.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
greeter = "gtkgreet";
|
||||
|
||||
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||
# https://github.com/swaywm/sway/issues/5732#issuecomment-1583336383
|
||||
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
|
||||
exec hash dbus-update-activation-environment 2>/dev/null && \
|
||||
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
|
||||
|
||||
exec "${pkgs.greetd.${greeter}}/bin/${greeter} -l; swaymsg exit"
|
||||
bindsym Mod4+shift+e exec swaynag \
|
||||
-t warning \
|
||||
-m 'What do you want to do?' \
|
||||
-b 'Poweroff' 'systemctl poweroff' \
|
||||
-b 'Reboot' 'systemctl reboot'
|
||||
'';
|
||||
in {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||||
user = "jacek";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"greetd/environments".text = ''
|
||||
Hyprland
|
||||
zsh
|
||||
shutdown now
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue