From f13db672b865177045b4bc168f14f87bd7646297 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sun, 22 Oct 2023 19:31:56 -0700 Subject: [PATCH] added hyperland --- home.nix | 31 +++++++++++++------------------ modules/hyprland.nix | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 modules/hyprland.nix diff --git a/home.nix b/home.nix index ad992c1..5c473b7 100644 --- a/home.nix +++ b/home.nix @@ -86,11 +86,6 @@ let # Drawing tablet driver opentabletdriver ]; - - # tmp_pkgs = cli_packages ++ gui_application else cli_packages; - -# install_pkgs = builtins.trace ''${osConfig.networking.hostName}'' tmp_pkgs; - in { @@ -103,23 +98,11 @@ in ./modules/tmux.nix ./modules/wezterm.nix ./modules/xdg.nix + ./modules/hyprland.nix ./modules/yazi.nix ./modules/zsh.nix ]; - home.file = { - ".config/awesome" = { - source = ./rsrcs/awesome; - recursive = true; - }; - ".config/awesome/cpu-widget.lua".source = "${awesome-wm-widgets}/cpu-widget/cpu-widget.lua"; - ".config/awesome/ram-widget.lua".source = "${awesome-wm-widgets}/ram-widget/ram-widget.lua"; - ".config/awesome/batteryarc.lua".source = "${awesome-wm-widgets}/batteryarc-widget/batteryarc.lua"; - ".config/awesome/awesome-wm-widgets/spaceman.jpg".source = "${awesome-wm-widgets}/batteryarc-widget/spaceman.jpg"; - ".config/awesome/calendar.lua".source = "${awesome-wm-widgets}/calendar-widget/batteryarc.lua"; - }; - - # Let Home Manager install and manage itself. programs.home-manager.enable = true; @@ -128,6 +111,18 @@ in programs.direnv.nix-direnv.enable = true; home = { + file = { + ".config/awesome" = { + source = ./rsrcs/awesome; + recursive = true; + }; + ".config/awesome/cpu-widget.lua".source = "${awesome-wm-widgets}/cpu-widget/cpu-widget.lua"; + ".config/awesome/ram-widget.lua".source = "${awesome-wm-widgets}/ram-widget/ram-widget.lua"; + ".config/awesome/batteryarc.lua".source = "${awesome-wm-widgets}/batteryarc-widget/batteryarc.lua"; + ".config/awesome/awesome-wm-widgets/spaceman.jpg".source = "${awesome-wm-widgets}/batteryarc-widget/spaceman.jpg"; + ".config/awesome/calendar.lua".source = "${awesome-wm-widgets}/calendar-widget/batteryarc.lua"; + }; + # Home Manager needs a bit of information about you and the # paths it should manage. username = user; diff --git a/modules/hyprland.nix b/modules/hyprland.nix new file mode 100644 index 0000000..438c608 --- /dev/null +++ b/modules/hyprland.nix @@ -0,0 +1,37 @@ +{config, pkgs, ...}: + +let + +in +{ + + wayland.windowManager.hyprland = { + enable = true; + package = pkgs.hyprland; + # Whether to enable XWayland + xwayland.enable = true; + + # Optional + # Whether to enable hyprland-session.target on hyprland startup + systemd.enable = true; + # Whether to enable patching wlroots for better Nvidia support + enableNvidiaPatches = true; + + settings = { + decoration = { + shadow_offset = "0 5"; + "col.shadow" = "rgba(00000099)"; + }; + + "$mod" = "SUPER"; + + bindm = [ + # mouse movements + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + }; + }; + +}