restructured desktopConfig

This commit is contained in:
Aly Raffauf 2024-03-29 08:40:42 -04:00
parent 0679717dc9
commit 41a6e55ba3
9 changed files with 23 additions and 11 deletions

View file

@ -78,7 +78,7 @@ in {
desktopConfig = { desktopConfig = {
enable = true; enable = true;
windowManagers.hyprland.enable = false; windowManagers.hyprland.enable = false;
gnome.enable = true; desktopEnvironments.gnome.enable = true;
}; };
apps = { apps = {

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
imports = imports =
[ ./displayManagers/lightdm ./gnome ./plasma ./windowManagers/hyprland ]; [ ./displayManagers/lightdm ./desktopEnvironments ./windowManagers ];
options = { options = {
desktopConfig.enable = desktopConfig.enable =

View file

@ -0,0 +1,4 @@
{ pkgs, lib, config, ... }: {
imports = [ ./gnome ./plasma ];
}

View file

@ -6,11 +6,12 @@
]; ];
options = { options = {
desktopConfig.gnome.enable = desktopConfig.desktopEnvironments.gnome.enable =
lib.mkEnableOption "Enables GNOME desktop session."; lib.mkEnableOption "Enables GNOME desktop session.";
}; };
config = lib.mkIf config.desktopConfig.gnome.enable { config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnomeExtensions.appindicator gnomeExtensions.appindicator
gnomeExtensions.blur-my-shell gnomeExtensions.blur-my-shell

View file

@ -1,11 +1,11 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
options = { options = {
desktopConfig.gnome.fprintdFix.enable = lib.mkEnableOption desktopConfig.desktopEnvironments.gnome.fprintdFix.enable = lib.mkEnableOption
"Fixes fprintd and pam issues with GNOME Display Manager."; "Fixes fprintd and pam issues with GNOME Display Manager.";
}; };
config = lib.mkIf config.desktopConfig.gnome.fprintdFix.enable { config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.fprintdFix.enable {
# Need to change the order pam loads its modules # Need to change the order pam loads its modules
# to get proper fingerprint behavior on GDM and the lockscreen. # to get proper fingerprint behavior on GDM and the lockscreen.
security.pam.services.login.fprintAuth = false; security.pam.services.login.fprintAuth = false;

View file

@ -1,11 +1,11 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
options = { options = {
desktopConfig.gnome.tripleBuffering.enable = desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable =
lib.mkEnableOption "Enables dynamic triple buffering for GNOME."; lib.mkEnableOption "Enables dynamic triple buffering for GNOME.";
}; };
config = lib.mkIf config.desktopConfig.gnome.tripleBuffering.enable { config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable {
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {
gnome = prev.gnome.overrideScope (gnomeFinal: gnomePrev: { gnome = prev.gnome.overrideScope (gnomeFinal: gnomePrev: {

View file

@ -6,6 +6,7 @@
}; };
config = lib.mkIf config.desktopConfig.plasma.enable { config = lib.mkIf config.desktopConfig.plasma.enable {
# Enable SDDM + Plasma Desktop. # Enable SDDM + Plasma Desktop.
services = { services = {
desktopManager.plasma6.enable = true; desktopManager.plasma6.enable = true;

View file

@ -0,0 +1,4 @@
{ pkgs, lib, config, ... }: {
imports = [ ./hyprland ];
}

View file

@ -1,14 +1,14 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
options = { options = {
desktopConfig.windowManagers.hyprland.enable = lib.mkEnableOption desktopConfig.windowManagers.hyprland.enable =
"Enables hyprland window manager session."; lib.mkEnableOption "Enables hyprland window manager session.";
}; };
config = lib.mkIf config.desktopConfig.windowManagers.hyprland.enable { config = lib.mkIf config.desktopConfig.windowManagers.hyprland.enable {
desktopConfig.displayManagers.lightdm.enable = lib.mkDefault true; desktopConfig.displayManagers.lightdm.enable = lib.mkDefault true;
programs.hyprland.enable = true; programs.hyprland.enable = true;
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
services.upower.enable = true; services.upower.enable = true;
@ -22,6 +22,8 @@
services.gvfs.enable = true; # Mount, trash, and other functionalities services.gvfs.enable = true; # Mount, trash, and other functionalities
services.tumbler.enable = true; # Thumbnail support for images services.tumbler.enable = true; # Thumbnail support for images
xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
}; };
} }