cleaned up and abstracted hyprland module config into lightdm, desktopConfig, and systemConfig

This commit is contained in:
Aly Raffauf 2024-03-30 14:48:48 -04:00
parent 72b7792902
commit 95c3b00038
7 changed files with 47 additions and 35 deletions

View file

@ -30,8 +30,7 @@
hyprland-protocols
hyprnome
hyprshot
playerctls
xdg-desktop-portal-hyprland
playerctl
xfce.exo
xfce.ristretto
xfce.thunar
@ -59,6 +58,12 @@
WebBrowser=firefox
'';
xdg.portal = {
enable = true;
configPackages = [ pkgs.xdg-desktop-portal-hyprland ];
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
};
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;

View file

@ -9,28 +9,26 @@
};
config = lib.mkIf config.desktopConfig.enable {
# Enable the X11 windowing system.
services.xserver = {
enable = true;
xkb.layout = "us";
xkb.variant = "";
excludePackages = with pkgs; [ xterm ];
services = {
gnome.gnome-keyring.enable = true;
gvfs.enable = true; # Mount, trash, etc.
# Enable the X11 windowing system.
xserver = {
enable = true;
xkb.layout = "us";
xkb.variant = "";
excludePackages = with pkgs; [ xterm ];
};
};
# Install pretty fonts.
fonts.packages = with pkgs;
[
liberation_ttf
(nerdfonts.override {
fonts = [
"DroidSansMono"
"FiraCode"
"FiraMono"
"Hack"
"Noto"
];
})
];
fonts.packages = with pkgs; [
liberation_ttf
(nerdfonts.override {
fonts = [ "DroidSansMono" "FiraCode" "FiraMono" "Hack" "Noto" ];
})
];
desktopConfig.windowManagers.hyprland.enable = lib.mkDefault true;
};

View file

@ -31,7 +31,6 @@
programs.kdeconnect.enable = true;
# nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true;
# nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto";
services.gnome.gnome-keyring.enable = true;
security.pam.services.sddm.enableGnomeKeyring = true;
};
}

View file

@ -6,6 +6,10 @@
};
config = lib.mkIf config.desktopConfig.displayManagers.lightdm.enable {
security.pam.services.lightdm.enableKwallet = true;
security.pam.services.lightdm.enableGnomeKeyring = true;
services.xserver.displayManager.lightdm = {
enable = true;
greeters.slick = {

View file

@ -10,20 +10,9 @@
desktopConfig.displayManagers.lightdm.enable = lib.mkDefault true;
programs.hyprland.enable = true;
services.power-profiles-daemon.enable = true;
services.upower.enable = true;
services.dbus.packages = [ pkgs.gcr ];
services.gnome.gnome-keyring.enable = true;
security.pam.services.gdm.enableKwallet = true;
security.pam.services.gdm.enableGnomeKeyring = true;
services.gvfs.enable = true; # Mount, trash, and other functionalities
services.tumbler.enable = true; # Thumbnail support for images
xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
environment.sessionVariables.NIXOS_OZONE_WL = "1";
};
}

View file

@ -1,7 +1,10 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
imports = [ ./network.nix ./sound.nix ./plymouth ./zramSwap ];
imports = [ ./network.nix ./sound.nix ./plymouth ./power-profiles-daemon ./zramSwap ];
systemConfig.power-profiles-daemon.enable = lib.mkDefault true;
# Set your time zone.
time.timeZone = "America/New_York";

View file

@ -0,0 +1,14 @@
{ pkgs, lib, config, ... }: {
options = {
systemConfig.power-profiles-daemon.enable = lib.mkEnableOption
"Enables power-profiles-daemon.";
};
config = lib.mkIf config.systemConfig.power-profiles-daemon.enable {
services = {
power-profiles-daemon.enable = true;
upower.enable = true;
};
};
}