From 1e192d9f115800aa1019e2858ae04767cf85535f Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sat, 30 Mar 2024 13:58:07 -0400 Subject: [PATCH] hyprland: moved hyprland plugins and extras into modules --- .../desktopEnv/hypr/default.nix | 34 +++++++----------- .../desktopEnv/hypr/hypridle/default.nix | 17 +++++++++ .../hypr/{ => hypridle}/hypridle.conf | 0 .../desktopEnv/hypr/hyprlock/default.nix | 17 +++++++++ .../hypr/{ => hyprlock}/hyprlock.conf | 0 .../desktopEnv/hypr/hyprpaper/default.nix | 24 +++++++++++++ .../hypr/{ => hyprpaper}/hyprpaper.conf | 0 .../{ => hyprpaper}/wallpapers/greenCity.jpg | Bin .../jr-korpa-9XngoIpxcEo-unsplash.jpg | Bin .../salty-justice-NOMebOREvtc-unsplash.jpg | Bin .../{ => hyprshade}/blue-light-filter.glsl | 0 .../desktopEnv/hypr/hyprshade/default.nix | 19 ++++++++++ .../hypr/{ => hyprshade}/hyprshade.toml | 0 13 files changed, 90 insertions(+), 21 deletions(-) create mode 100644 homeManagerModules/desktopEnv/hypr/hypridle/default.nix rename homeManagerModules/desktopEnv/hypr/{ => hypridle}/hypridle.conf (100%) create mode 100644 homeManagerModules/desktopEnv/hypr/hyprlock/default.nix rename homeManagerModules/desktopEnv/hypr/{ => hyprlock}/hyprlock.conf (100%) create mode 100644 homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix rename homeManagerModules/desktopEnv/hypr/{ => hyprpaper}/hyprpaper.conf (100%) rename homeManagerModules/desktopEnv/hypr/{ => hyprpaper}/wallpapers/greenCity.jpg (100%) rename homeManagerModules/desktopEnv/hypr/{ => hyprpaper}/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg (100%) rename homeManagerModules/desktopEnv/hypr/{ => hyprpaper}/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg (100%) rename homeManagerModules/desktopEnv/hypr/{ => hyprshade}/blue-light-filter.glsl (100%) create mode 100644 homeManagerModules/desktopEnv/hypr/hyprshade/default.nix rename homeManagerModules/desktopEnv/hypr/{ => hyprshade}/hyprshade.toml (100%) diff --git a/homeManagerModules/desktopEnv/hypr/default.nix b/homeManagerModules/desktopEnv/hypr/default.nix index 6e394678..23740e83 100644 --- a/homeManagerModules/desktopEnv/hypr/default.nix +++ b/homeManagerModules/desktopEnv/hypr/default.nix @@ -1,5 +1,12 @@ { pkgs, lib, config, ... }: { + imports = [ + ./hypridle + ./hyprlock + ./hyprpaper + ./hyprshade + ]; + options = { desktopEnv.hyprland.enable = lib.mkEnableOption "Enables hyprland with extra apps."; @@ -7,6 +14,12 @@ config = lib.mkIf config.desktopEnv.hyprland.enable { + # Hypr* modules, plguins, and tools. + desktopEnv.hyprland.hypridle.enable = lib.mkDefault true; + desktopEnv.hyprland.hyprlock.enable = lib.mkDefault true; + desktopEnv.hyprland.hyprpaper.enable = lib.mkDefault true; + desktopEnv.hyprland.hyprshade.enable = lib.mkDefault true; + # Basic apps needed to run a hyprland desktop. guiApps.waybar.enable = lib.mkDefault true; guiApps.mako.enable = lib.mkDefault true; @@ -19,12 +32,8 @@ brightnessctl evince hyprcursor - hypridle hyprland-protocols - hyprlock hyprnome - hyprpaper - hyprshade hyprshot playerctl pyprland @@ -50,23 +59,6 @@ extraConfig = builtins.readFile ./hyprland.conf; }; - xdg.configFile."hypr/hypridle.conf".source = ./hypridle.conf; - - xdg.configFile."hypr/hyprlock.conf".source = ./hyprlock.conf; - - xdg.configFile."hypr/hyprpaper.conf".source = ./hyprpaper.conf; - - xdg.configFile."hypr/wallpapers/greenCity.jpg".source = - ./wallpapers/greenCity.jpg; - xdg.configFile."hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg".source = - ./wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg; - xdg.configFile."hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg".source = - ./wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg; - - xdg.configFile."hypr/shaders/blue-light-filter.glsl".source = - ./blue-light-filter.glsl; - xdg.configFile."hypr/hyprshade.toml".source = ./hyprshade.toml; - xdg.configFile."xfce4/helpers.rc".text = '' TerminalEmulator=alacritty FileManager=thunar diff --git a/homeManagerModules/desktopEnv/hypr/hypridle/default.nix b/homeManagerModules/desktopEnv/hypr/hypridle/default.nix new file mode 100644 index 00000000..4a71a2ed --- /dev/null +++ b/homeManagerModules/desktopEnv/hypr/hypridle/default.nix @@ -0,0 +1,17 @@ +{ pkgs, lib, config, ... }: { + + options = { + desktopEnv.hyprland.hypridle.enable = + lib.mkEnableOption "Enables hypridle."; + }; + + config = lib.mkIf config.desktopEnv.hyprland.hypridle.enable { + + # Packages that should be installed to the user profile. + home.packages = with pkgs; [ + hypridle + ]; + + xdg.configFile."hypr/hypridle.conf".source = ./hypridle.conf; + }; +} diff --git a/homeManagerModules/desktopEnv/hypr/hypridle.conf b/homeManagerModules/desktopEnv/hypr/hypridle/hypridle.conf similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hypridle.conf rename to homeManagerModules/desktopEnv/hypr/hypridle/hypridle.conf diff --git a/homeManagerModules/desktopEnv/hypr/hyprlock/default.nix b/homeManagerModules/desktopEnv/hypr/hyprlock/default.nix new file mode 100644 index 00000000..40be3326 --- /dev/null +++ b/homeManagerModules/desktopEnv/hypr/hyprlock/default.nix @@ -0,0 +1,17 @@ +{ pkgs, lib, config, ... }: { + + options = { + desktopEnv.hyprland.hyprlock.enable = + lib.mkEnableOption "Enables hyprlock."; + }; + + config = lib.mkIf config.desktopEnv.hyprland.hyprlock.enable { + + # Packages that should be installed to the user profile. + home.packages = with pkgs; [ + hyprlock + ]; + + xdg.configFile."hypr/hyprlock.conf".source = ./hyprlock.conf; + }; +} diff --git a/homeManagerModules/desktopEnv/hypr/hyprlock.conf b/homeManagerModules/desktopEnv/hypr/hyprlock/hyprlock.conf similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprlock.conf rename to homeManagerModules/desktopEnv/hypr/hyprlock/hyprlock.conf diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix b/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix new file mode 100644 index 00000000..4db3b4d9 --- /dev/null +++ b/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix @@ -0,0 +1,24 @@ +{ pkgs, lib, config, ... }: { + + options = { + desktopEnv.hyprland.hyprpaper.enable = + lib.mkEnableOption "Enables hyprpaper and assorted wallpapers."; + }; + + config = lib.mkIf config.desktopEnv.hyprland.hyprpaper.enable { + + # Packages that should be installed to the user profile. + home.packages = with pkgs; [ + hyprpaper + ]; + + xdg.configFile."hypr/hyprpaper.conf".source = ./hyprpaper.conf; + + xdg.configFile."hypr/wallpapers/greenCity.jpg".source = + ./wallpapers/greenCity.jpg; + xdg.configFile."hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg".source = + ./wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg; + xdg.configFile."hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg".source = + ./wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg; + }; +} diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper.conf b/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper.conf similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper.conf rename to homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper.conf diff --git a/homeManagerModules/desktopEnv/hypr/wallpapers/greenCity.jpg b/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/greenCity.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/wallpapers/greenCity.jpg rename to homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/greenCity.jpg diff --git a/homeManagerModules/desktopEnv/hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg b/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg rename to homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg diff --git a/homeManagerModules/desktopEnv/hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg b/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg rename to homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg diff --git a/homeManagerModules/desktopEnv/hypr/blue-light-filter.glsl b/homeManagerModules/desktopEnv/hypr/hyprshade/blue-light-filter.glsl similarity index 100% rename from homeManagerModules/desktopEnv/hypr/blue-light-filter.glsl rename to homeManagerModules/desktopEnv/hypr/hyprshade/blue-light-filter.glsl diff --git a/homeManagerModules/desktopEnv/hypr/hyprshade/default.nix b/homeManagerModules/desktopEnv/hypr/hyprshade/default.nix new file mode 100644 index 00000000..ea142b73 --- /dev/null +++ b/homeManagerModules/desktopEnv/hypr/hyprshade/default.nix @@ -0,0 +1,19 @@ +{ pkgs, lib, config, ... }: { + + options = { + desktopEnv.hyprland.hyprshade.enable = + lib.mkEnableOption "Enables hyprshade with blue light filter."; + }; + + config = lib.mkIf config.desktopEnv.hyprland.hyprshade.enable { + + # Packages that should be installed to the user profile. + home.packages = with pkgs; [ + hyprshade + ]; + + xdg.configFile."hypr/shaders/blue-light-filter.glsl".source = + ./blue-light-filter.glsl; + xdg.configFile."hypr/hyprshade.toml".source = ./hyprshade.toml; + }; +} diff --git a/homeManagerModules/desktopEnv/hypr/hyprshade.toml b/homeManagerModules/desktopEnv/hypr/hyprshade/hyprshade.toml similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprshade.toml rename to homeManagerModules/desktopEnv/hypr/hyprshade/hyprshade.toml