diff --git a/workstation/configuration.nix b/workstation/configuration.nix index 4f8917a..7df27b6 100644 --- a/workstation/configuration.nix +++ b/workstation/configuration.nix @@ -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 = {