workstation | enable greetd to start things up

This commit is contained in:
Don Harper 2022-12-28 18:48:56 -06:00
parent a4c0d9066b
commit 311b925cff

View file

@ -1,5 +1,15 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
swayConfig = pkgs.writeText "greetd-sway-config" ''
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -c sway; 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
{
# Bootloader.
boot.loader.systemd-boot.enable = true;
@ -22,8 +32,24 @@
# Select internationalisation properties.
i18n.defaultLocale = "en_US.utf8";
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
};
};
};
environment.etc."greetd/environments".text = ''
sway
fish
bash
startxfce4
'';
# Splash screen
boot.plymouth.enable = false;
boot.plymouth.enable = true;
boot.plymouth.theme = "breeze";
security.polkit.enable = true;
@ -39,10 +65,6 @@
# Enable the X11 windowing system.
#services.xserver.enable = false;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.wayland = true;
#services.xserver.desktopManager.gnome.enable = false;
# Configure keymap in X11
#services.xserver = {