From 970e840c1607ac412e1a34eccd342ce2a1195caf Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 24 Mar 2024 10:59:08 -0400 Subject: [PATCH] home-manager: modularized configs --- home/aly.nix | 7 ++- home/bemenu/default.nix | 7 +++ home/hypr/default.nix | 34 +++++++++++++++ home/{dotfiles => hypr}/hypridle.conf | 0 home/{dotfiles => hypr}/hyprland.conf | 0 home/{dotfiles => hypr}/hyprlock.conf | 0 home/mako/default.nix | 13 ++++++ home/{shell.nix => shell/default.nix} | 6 ++- home/{dotfiles => shell}/emacs.el | 0 home/{hyprland.nix => waybar/default.nix} | 53 +---------------------- home/waybar/waybar.css | 20 +++++++++ 11 files changed, 85 insertions(+), 55 deletions(-) create mode 100644 home/bemenu/default.nix create mode 100644 home/hypr/default.nix rename home/{dotfiles => hypr}/hypridle.conf (100%) rename home/{dotfiles => hypr}/hyprland.conf (100%) rename home/{dotfiles => hypr}/hyprlock.conf (100%) create mode 100644 home/mako/default.nix rename home/{shell.nix => shell/default.nix} (96%) rename home/{dotfiles => shell}/emacs.el (100%) rename home/{hyprland.nix => waybar/default.nix} (70%) create mode 100644 home/waybar/waybar.css diff --git a/home/aly.nix b/home/aly.nix index e34cac7f..0c86904e 100644 --- a/home/aly.nix +++ b/home/aly.nix @@ -3,8 +3,11 @@ { imports = [ ./gnome.nix - ./shell.nix - ./hyprland.nix + ./shell + ./hypr + ./waybar + ./mako + ./bemenu ]; home.username = "aly"; diff --git a/home/bemenu/default.nix b/home/bemenu/default.nix new file mode 100644 index 00000000..c2fa7326 --- /dev/null +++ b/home/bemenu/default.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + programs.bemenu = { + enable = true; + }; +} \ No newline at end of file diff --git a/home/hypr/default.nix b/home/hypr/default.nix new file mode 100644 index 00000000..ee2a001f --- /dev/null +++ b/home/hypr/default.nix @@ -0,0 +1,34 @@ +{ config, pkgs, ... }: + +{ + # Packages that should be installed to the user profile. + home.packages = with pkgs; [ + brightnessctl + hyprcursor + hypridle + hyprlock + hyprpaper + hyprshade + hyprshot + playerctl + udiskie + ]; + + services.mako = { + enable = true; + font = "DroidSansM Nerd Font Mono 11"; + backgroundColor = "#00000080"; + textColor = "#FFFFFF"; + borderRadius = 10; + defaultTimeout = 10000; + padding = "15"; + }; + + wayland.windowManager.hyprland = { + enable = true; + extraConfig = builtins.readFile ./hyprland.conf; + }; + + xdg.configFile."hypr/hypridle.conf".source = ./hypridle.conf; + xdg.configFile."hypr/hyprlock.conf".source = ./hyprlock.conf; +} diff --git a/home/dotfiles/hypridle.conf b/home/hypr/hypridle.conf similarity index 100% rename from home/dotfiles/hypridle.conf rename to home/hypr/hypridle.conf diff --git a/home/dotfiles/hyprland.conf b/home/hypr/hyprland.conf similarity index 100% rename from home/dotfiles/hyprland.conf rename to home/hypr/hyprland.conf diff --git a/home/dotfiles/hyprlock.conf b/home/hypr/hyprlock.conf similarity index 100% rename from home/dotfiles/hyprlock.conf rename to home/hypr/hyprlock.conf diff --git a/home/mako/default.nix b/home/mako/default.nix new file mode 100644 index 00000000..46d56622 --- /dev/null +++ b/home/mako/default.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + services.mako = { + enable = true; + font = "DroidSansM Nerd Font Mono 11"; + backgroundColor = "#00000080"; + textColor = "#FFFFFF"; + borderRadius = 10; + defaultTimeout = 10000; + padding = "15"; + }; +} diff --git a/home/shell.nix b/home/shell/default.nix similarity index 96% rename from home/shell.nix rename to home/shell/default.nix index cf50ac4f..c8ae7a83 100644 --- a/home/shell.nix +++ b/home/shell/default.nix @@ -7,8 +7,10 @@ curl gh git - wget nixfmt + python3 + ruby + wget ]; programs.bash = { @@ -41,7 +43,7 @@ ]) ); package = pkgs.emacs-nox; - extraConfig = builtins.readFile ./dotfiles/emacs.el; + extraConfig = builtins.readFile ./emacs.el; }; programs.eza = { diff --git a/home/dotfiles/emacs.el b/home/shell/emacs.el similarity index 100% rename from home/dotfiles/emacs.el rename to home/shell/emacs.el diff --git a/home/hyprland.nix b/home/waybar/default.nix similarity index 70% rename from home/hyprland.nix rename to home/waybar/default.nix index 1e1bff90..a903eb53 100644 --- a/home/hyprland.nix +++ b/home/waybar/default.nix @@ -3,62 +3,13 @@ { # Packages that should be installed to the user profile. home.packages = with pkgs; [ - bemenu - brightnessctl - hyprcursor - hypridle - hyprlock - hyprpaper - hyprshade - hyprshot - mako overskride pavucontrol - playerctl - udiskie ]; - services.mako = { - enable = true; - font = "DroidSansM Nerd Font Mono 11"; - backgroundColor = "#00000080"; - textColor = "#FFFFFF"; - borderRadius = 10; - defaultTimeout = 10000; - padding = "15"; - }; - - wayland.windowManager.hyprland = { - enable = true; - extraConfig = builtins.readFile ./dotfiles/hyprland.conf; - }; - - xdg.configFile."hypr/hypridle.conf".source = ./dotfiles/hypridle.conf; - xdg.configFile."hypr/hyprlock.conf".source = ./dotfiles/hyprlock.conf; + xdg.configFile."waybar/style.css".source = ./waybar.css; programs.waybar.enable = true; - programs.waybar.style = '' - * { - border: none; - border-radius: 0; - font-family: DroidSansM Nerd Font Mono; - font-size: 14px; - } - window#waybar { - background: rgba (0, 0, 0, 0.5); - color: #FFFFFF; - } - #workspaces button { - padding: 5px 10px; - background: #000; - color: #FFFFFF; - } - #clock, #battery, #pulseaudio, #bluetooth, #network, #tray, #power-profiles-daemon { - padding: 0 10px; - margin: 0 5px; - } - #battery.critical { color: red; } - ''; programs.waybar.settings = { mainBar = { layer = "top"; @@ -73,7 +24,7 @@ modules-right = [ "tray" "bluetooth" "network" "pulseaudio" "battery" "power-profiles-daemon" "clock"]; "hyprland/workspaces" = { - all-outputs = true; + "all-outputs" = true; }; "hyprland/window" = { "max-length" = 150; diff --git a/home/waybar/waybar.css b/home/waybar/waybar.css new file mode 100644 index 00000000..6af365d6 --- /dev/null +++ b/home/waybar/waybar.css @@ -0,0 +1,20 @@ +* { + border: none; + border-radius: 0; + font-family: "DroidSansM Nerd Font Mono"; + font-size: 14px; +} +window#waybar { + background: rgba (0, 0, 0, 0.5); + color: #FFFFFF; +} +#workspaces button { + padding: 5px 10px; + background: #000; + color: #FFFFFF; +} +#clock, #battery, #pulseaudio, #bluetooth, #network, #tray, #power-profiles-daemon { + padding: 0 10px; + margin: 0 5px; +} +#battery.critical { color: red; } \ No newline at end of file