From 120c217fb50d8a152667da17b435a9d127b835d2 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sun, 27 Aug 2023 19:35:58 +0900 Subject: [PATCH] Testing nixpkgs-waylan doverlay --- README.md | 5 +++-- flake.nix | 3 ++- .../software/cli/doom-emacs.d/config.el | 15 +------------ nixos/common/desktops/hyprland/default.nix | 21 +++++++++++++------ 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 8072a9d7..b256565c 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,13 @@ nixos-rebuild switch --flake '/etc/nixos#' * [ ] Fix cursor size * [ ] Try the multi-GPU configs on the wiki * [ ] set up pinentry on awesome-hyprland - * [ ] Get swaylock to dim / turn off the screen, then enter suspend/hibernate + * [x] Get swaylock to dim / turn off the screen, then enter suspend/hibernate * [x] swayosd * [ ] wayprompt * [ ] Needs an overlay? Can't find it in search * [ ] wlogout / nwg-bar theming - * [ ] cli-based filebrowser for hyprland + * [x] cli-based filebrowser for hyprland + * Installed `ranger` * [x] Find a way to adjust window sizes with a keyboard shortcut in Hyprland * [ ] Try disko - [Link](https://github.com/nix-community/disko) * [ ] btrfs snapshots diff --git a/flake.nix b/flake.nix index 0d90003b..e0eb11b0 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ description = "NixOS System Config"; inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; + nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; home-manager.url = "github:nix-community/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; lanzaboote.url = "github:nix-community/lanzaboote"; @@ -11,7 +12,7 @@ doom-emacs.url = "github:nix-community/nix-doom-emacs"; }; outputs = { - self, nixpkgs, home-manager, lanzaboote, nur, sops-nix, doom-emacs, ... + self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, ... }@inputs: let inherit (self) outputs; diff --git a/home-manager/common/software/cli/doom-emacs.d/config.el b/home-manager/common/software/cli/doom-emacs.d/config.el index 39378c65..0de4792e 100644 --- a/home-manager/common/software/cli/doom-emacs.d/config.el +++ b/home-manager/common/software/cli/doom-emacs.d/config.el @@ -1,14 +1 @@ -(setq doom-theme 'doom-gruvbox) - -(defun posframe-poshandler-window-top-center-offset (info) - "Posframe's position handler. - -Get a position which let posframe stay onto current window's -top center. The structure of INFO can be found in docstring of -`posframe-show'." - (let* ((window-left (plist-get info :parent-window-left)) - (window-top (plist-get info :parent-window-top)) - (window-width (plist-get info :parent-window-width)) - (posframe-width (plist-get info :posframe-width))) - (cons (+ window-left (/ (- window-width posframe-width) 2)) - (+ window-top 48)))) +(setq doom-theme 'doom-gruvbox) \ No newline at end of file diff --git a/nixos/common/desktops/hyprland/default.nix b/nixos/common/desktops/hyprland/default.nix index ce083701..69d6c0eb 100644 --- a/nixos/common/desktops/hyprland/default.nix +++ b/nixos/common/desktops/hyprland/default.nix @@ -1,6 +1,14 @@ {pkgs, gpu, ...}: { - services.xserver.videoDrivers = [ gpu ]; + nixpkgs = { + overlays = [ + # https://github.com/nix-community/nixpkgs-wayland + inputs.nixpkgs-wayland.overlay + ]; + }; + + services.xserver.videoDrivers = [ gpu ]; + # tuigreet services.greetd = { enable = true; @@ -33,7 +41,7 @@ environment.sessionVariables = { # If your cursor becomes invisible - WLR_NO_HARDWARE_CURSORS = "1"; + WLR_NO_HARDWARE_CURSORS = "0"; # Hint electron apps to use wayland NIXOS_OZONE_WL = "1"; }; @@ -52,10 +60,6 @@ HibernateDelaySec = 600 ''; - services.autosuspend = { - enable = true; - }; - # XDG portal xdg.portal.enable = true; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; @@ -93,6 +97,11 @@ xdg-utils # Utilities for better X/Wayland integration ]; + # nixpkgs-wayland + environment.systemPackages = with input.nixpkgs-wayland.pkgs; [ + wayprompt + ] + # Enable sound with pipewire. sound.enable = true; security.rtkit.enable = true;