2022-06-23 02:57:41 -04:00
|
|
|
{ config, lib, pkgs, inputs, ... }:
|
2022-10-13 22:13:43 -04:00
|
|
|
let nc = config.nathan.config;
|
|
|
|
in with lib; {
|
2022-06-23 02:57:41 -04:00
|
|
|
config = mkIf nc.swaywm.enable {
|
|
|
|
# Turn on GDM for login
|
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
2022-07-20 23:52:18 -04:00
|
|
|
autorun = true;
|
2022-06-23 02:57:41 -04:00
|
|
|
displayManager = {
|
2022-07-20 23:52:18 -04:00
|
|
|
sddm = {
|
2022-06-23 02:57:41 -04:00
|
|
|
enable = true;
|
2022-07-20 23:52:18 -04:00
|
|
|
settings = {
|
2022-10-13 22:13:43 -04:00
|
|
|
Wayland = { CompositorCommand = "kwin_wayland --no-lockscreen"; };
|
2022-07-20 23:52:18 -04:00
|
|
|
};
|
|
|
|
theme = "sugar-dark";
|
2022-06-23 02:57:41 -04:00
|
|
|
};
|
|
|
|
defaultSession = "sway";
|
|
|
|
};
|
|
|
|
# Enable plasma for the applications
|
|
|
|
desktopManager.plasma5.enable = true;
|
|
|
|
};
|
|
|
|
# Setup drivers
|
|
|
|
hardware.opengl = {
|
|
|
|
# Enable vulkan
|
|
|
|
driSupport = true;
|
|
|
|
# Same as above, but enable 32 bit legacy support (for games)
|
|
|
|
driSupport32Bit = true;
|
|
|
|
};
|
|
|
|
# Basic packages that are effectively required for a graphical system
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
# GTK Theming
|
|
|
|
gtk-engine-murrine
|
|
|
|
gtk_engines
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
lxappearance
|
|
|
|
kde-gtk-config
|
2022-07-20 23:52:18 -04:00
|
|
|
(stdenv.mkDerivation rec {
|
|
|
|
pname = "sddm-sugar-dark-theme";
|
|
|
|
version = "1.2";
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/sddm/themes
|
|
|
|
cp -aR $src $out/share/sddm/themes/sugar-dark
|
|
|
|
'';
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MarianArlt";
|
|
|
|
repo = "sddm-sugar-dark";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0gx0am7vq1ywaw2rm1p015x90b75ccqxnb1sz3wy8yjl27v82yhb";
|
|
|
|
};
|
|
|
|
})
|
2022-06-23 02:57:41 -04:00
|
|
|
];
|
|
|
|
# Enable QT themeing
|
|
|
|
programs.qt5ct.enable = true;
|
|
|
|
# Enable and configure sway itself
|
|
|
|
programs.sway = {
|
|
|
|
enable = true;
|
|
|
|
# Enable the wrapper for gtk applications
|
|
|
|
wrapperFeatures.gtk = true;
|
|
|
|
};
|
|
|
|
|
2022-10-13 22:13:43 -04:00
|
|
|
environment.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; };
|
2022-06-23 02:57:41 -04:00
|
|
|
|
|
|
|
# Enable the xdg-portal
|
|
|
|
xdg = {
|
|
|
|
portal = {
|
|
|
|
enable = true;
|
|
|
|
extraPortals = with pkgs; [
|
|
|
|
xdg-desktop-portal-wlr
|
|
|
|
xdg-desktop-portal-gtk
|
|
|
|
];
|
|
|
|
gtkUsePortal = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|