From f016f1c7d1a1427ff9810b2ca5a4fe422249b14d Mon Sep 17 00:00:00 2001 From: Ludovic Ortega Date: Thu, 26 Sep 2024 02:30:09 +0200 Subject: [PATCH] feat: try hyprland with home-manager --- home/config/hypr/hyprland.conf | 22 +--------------------- home/default.nix | 7 ------- home/user/environment.nix | 19 +++++++++++++++++++ home/user/gtk.nix | 13 ++++++++++--- home/user/programs/default.nix | 1 + home/user/programs/hyprland.nix | 1 + system/modules/default.nix | 1 - system/modules/dm.nix | 12 ------------ system/modules/nixsettings.nix | 2 +- 9 files changed, 33 insertions(+), 45 deletions(-) create mode 100644 home/user/programs/hyprland.nix delete mode 100644 system/modules/dm.nix diff --git a/home/config/hypr/hyprland.conf b/home/config/hypr/hyprland.conf index 58d3054..0207969 100644 --- a/home/config/hypr/hyprland.conf +++ b/home/config/hypr/hyprland.conf @@ -39,27 +39,7 @@ exec-once = swaync ############################# # See https://wiki.hyprland.org/Configuring/Environment-variables/ -env = NIXOS_OZONE_WL,1 -env = WLR_RENDERER_ALLOW_SOFTWARE,1 - -# https://wiki.hyprland.org/Configuring/Environment-variables/ -env = CLUTTER_BACKEND,waland -env = XDG_CURRENT_DESKTOP,Hyprland -env = XDG_SESSION_TYPE,wayland -env = XDG_SESSION_DESKTOP,Hyprland -env = XDG_CACHE_HOME,$HOME/.cache -env = XDG_CONFIG_HOME,$HOME/.config -env = XDG_DATA_HOME,$HOME/.local/share -env = GDK_BACKEND,wayland -env = GTK_USE_PORTAL,1 -env = QT_QPA_PLATFORM,wayland -env = QT_QPA_PLATFORMTHEME,qt6ct -env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 -env = QT_AUTO_SCREEN_SCALE_FACTOR,1 -env = SDL_VIDEODRIVER,wayland - -# others -env = MOZ_ENABLE_WAYLAND,1 + ##################### ### LOOK AND FEEL ### diff --git a/home/default.nix b/home/default.nix index 2d3048a..0f4535f 100644 --- a/home/default.nix +++ b/home/default.nix @@ -17,12 +17,5 @@ homeDirectory = "/home/${username}"; }; - home.pointerCursor = { - gtk.enable = true; - package = pkgs.catppuccin-cursors.macchiatoLight; - name = "Catppuccin-Macchiato-Light"; - size = 24; - }; - home.stateVersion = "24.05"; } diff --git a/home/user/environment.nix b/home/user/environment.nix index a75df30..8b33467 100644 --- a/home/user/environment.nix +++ b/home/user/environment.nix @@ -1,5 +1,24 @@ { home.sessionVariables = { + NIXOS_OZONE_WL = "1"; + WLR_RENDERER_ALLOW_SOFTWARE = "1"; + + # https://wiki.hyprland.org/Configuring/Environment-variables/ + CLUTTER_BACKEND = "waland"; + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + XDG_SESSION_DESKTOP = "Hyprland"; + GDK_BACKEND = "wayland"; + GTK_USE_PORTAL = "1"; + QT_QPA_PLATFORM = "wayland"; + QT_QPA_PLATFORMTHEME = "qt6ct"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + SDL_VIDEODRIVER = "wayland"; + + # others + MOZ_ENABLE_WAYLAND = "1"; + # Python SSL self signed certs REQUESTS_CA_BUNDLE = "/etc/ssl/certs/ca-certificates.crt"; }; diff --git a/home/user/gtk.nix b/home/user/gtk.nix index 821de87..51451a9 100644 --- a/home/user/gtk.nix +++ b/home/user/gtk.nix @@ -1,5 +1,12 @@ { pkgs, ... }: { + home.pointerCursor = { + gtk.enable = true; + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 16; + }; + gtk = { enable = true; @@ -14,8 +21,8 @@ }; font = { - name = "JetBrainsMono Nerd Font"; - size = 12; + name = "Sans"; + size = 11; }; gtk3.extraConfig = { @@ -31,4 +38,4 @@ }; }; -} \ No newline at end of file +} diff --git a/home/user/programs/default.nix b/home/user/programs/default.nix index 2cbdfc2..0103348 100644 --- a/home/user/programs/default.nix +++ b/home/user/programs/default.nix @@ -3,6 +3,7 @@ ./firefox.nix ./git.nix ./home-manager.nix + ./hyprland.nix ./starship.nix ./vscode.nix ./zsh.nix diff --git a/home/user/programs/hyprland.nix b/home/user/programs/hyprland.nix new file mode 100644 index 0000000..94f8273 --- /dev/null +++ b/home/user/programs/hyprland.nix @@ -0,0 +1 @@ +{ wayland.windowManager.hyprland.enable = true; } diff --git a/system/modules/default.nix b/system/modules/default.nix index e943da8..b9aa08a 100644 --- a/system/modules/default.nix +++ b/system/modules/default.nix @@ -5,7 +5,6 @@ ./boot.nix ./ca-certificates.nix ./dns.nix - ./dm.nix ./file.nix ./game.nix ./gpg.nix diff --git a/system/modules/dm.nix b/system/modules/dm.nix deleted file mode 100644 index 4b94540..0000000 --- a/system/modules/dm.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, username, ... }: -{ - services.greetd = { - enable = true; - settings = rec { - default_session = { - command = "${pkgs.hyprland}/bin/Hyprland"; - user = "${username}"; - }; - }; - }; -} diff --git a/system/modules/nixsettings.nix b/system/modules/nixsettings.nix index 66ad0d4..16ce794 100644 --- a/system/modules/nixsettings.nix +++ b/system/modules/nixsettings.nix @@ -18,7 +18,7 @@ options = "--delete-older-than 7d"; }; }; - + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [