System/modules/linux/hyprland.nix

79 lines
2.2 KiB
Nix
Raw Normal View History

2022-06-23 02:57:41 -04:00
{ config, lib, pkgs, inputs, ... }:
let nc = config.nathan.config;
in with lib; {
2023-06-18 16:39:16 -04:00
config = mkIf nc.hyprland.enable {
2022-06-23 02:57:41 -04:00
# Turn on GDM for login
services.xserver = {
enable = true;
2023-06-18 18:29:37 -04:00
autorun = false;
2022-06-23 02:57:41 -04:00
# Enable plasma for the applications
desktopManager.plasma5.enable = true;
};
2023-06-18 18:29:37 -04:00
# Greetd for login
programs.regreet = {
enable = true;
settings = { GTK = { font_name = "Roboto 16"; }; };
package = pkgs.greetd.regreet.overrideAttrs (old: {
preBuild = ''
export SESSION_DIRS=/run/current-system/sw/share/xsessions:/run/current-system/sw/share/wayland-sessions
echo SESSION_DIRS=$SESSION_DIRS
'';
});
};
services.greetd = {
enable = true;
settings = { default_session.command = "cage -s -- regreet"; };
};
2022-06-23 02:57:41 -04:00
# 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; [
2023-06-18 18:29:37 -04:00
# Greeter packages
cage
config.programs.regreet.package
gnome.adwaita-icon-theme
2022-06-23 02:57:41 -04:00
# 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
];
2023-05-30 09:18:20 -04:00
qt.platformTheme = "qt5ct";
2023-06-13 23:21:21 -04:00
# Enable and configure hyperland
programs.hyprland = {
enable = true;
xwayland = {
enable = true;
2023-06-16 20:19:21 -04:00
hidpi = false;
2023-06-13 23:21:21 -04:00
};
};
2023-06-17 01:45:20 -04:00
# Make swaylock work
# https://github.com/NixOS/nixpkgs/issues/158025
security.pam.services.swaylock = { };
2022-06-23 02:57:41 -04:00
environment.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; };
2022-06-23 02:57:41 -04:00
};
}