From 60228a141c293b17dba50da7225e5c7f1cd67f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Gro=C3=9Fmann?= Date: Wed, 12 Apr 2023 23:52:20 +0900 Subject: [PATCH] chor: System update --- configuration.nix | 2 +- data/hyprland/config.nix | 110 ++++++++++++++-------------- flake.lock | 84 ++++++++++++--------- flake.nix | 1 - modules/hyprland.nix | 8 -- users/common/graphical/hyprland.nix | 1 + users/common/shells/zsh.nix | 4 +- 7 files changed, 112 insertions(+), 98 deletions(-) delete mode 100644 modules/hyprland.nix diff --git a/configuration.nix b/configuration.nix index 6c7378b..a856652 100644 --- a/configuration.nix +++ b/configuration.nix @@ -19,7 +19,6 @@ in { ./modules/networking.nix ./modules/nix.nix #./modules/xserver.nix - ./modules/hyprland.nix ]; # Use the systemd-boot EFI boot loader. @@ -38,6 +37,7 @@ in { layout = "de"; xkbVariant = "bone"; }; + programs.hyprland.enable = true; console = { font = "ter-v28n"; packages = with pkgs; [terminus_font]; diff --git a/data/hyprland/config.nix b/data/hyprland/config.nix index 7116922..0de7ce4 100644 --- a/data/hyprland/config.nix +++ b/data/hyprland/config.nix @@ -1,73 +1,77 @@ MOD: TAGS: pkgs: '' - general { - gaps_in = 1 - gaps_out = 0 + general { + gaps_in = 1 + gaps_out = 0 + } + + input { + sensitivity = 0 + kb_layout = de,de + kb_variant = bone, + repeat_rate = 60 + repeat_delay = 235 + # Only change focus on mouse click + follow_mouse = 2 + accel_profile = flat + touchpad { + natural_scroll = true } + } - input { - sensitivity = 0 - kb_layout = de,de - kb_variant = bone, - repeat_rate = 60 - repeat_delay = 235 - # Only change focus on mouse click - follow_mouse = 2 - accel_profile = flat - touchpad { - natural_scroll = true - } - } + gestures { + workspace_swipe = true + } - gestures { - workspace_swipe = true - } + misc { + disable_hyprland_logo = true + } - misc { - disable_hyprland_logo = true - } + # keybinds + bind=${MOD},q,killactive, + bind=${MOD},return,fullscreen, + bind=${MOD},f,togglefloating + bind=${MOD},tab,cyclenext, + bind=ALT,tab,cyclenext, + bind=,Menu,exec,rofi -show drun - # keybinds - bind=${MOD},q,killactive, - bind=${MOD},return,fullscreen, - bind=${MOD},f,togglefloating - bind=${MOD},tab,cyclenext, - bind=ALT,tab,cyclenext, - bind=,Menu,exec,rofi -show drun + bind=${MOD},left,movefocus,l + bind=${MOD},right,movefocus,r + bind=${MOD},up,movefocus,u + bind=${MOD},down,movefocus,d - bind=${MOD},left,movefocus,l - bind=${MOD},right,movefocus,r - bind=${MOD},up,movefocus,u - bind=${MOD},down,movefocus,d + bind=${MOD},n,movefocus,l + bind=${MOD},s,movefocus,r + bind=${MOD},l,movefocus,u + bind=${MOD},r,movefocus,d - bind=${MOD},n,movefocus,l - bind=${MOD},s,movefocus,r - bind=${MOD},l,movefocus,u - bind=${MOD},r,movefocus,d + bind=${MOD} + SHIFT,left,movewindow,l + bind=${MOD} + SHIFT,right,movewindow,r + bind=${MOD} + SHIFT,up,movewindow,u + bind=${MOD} + SHIFT,down,movewindow,d - bind=${MOD} + SHIFT,left,movewindow,l - bind=${MOD} + SHIFT,right,movewindow,r - bind=${MOD} + SHIFT,up,movewindow,u - bind=${MOD} + SHIFT,down,movewindow,d + bind=${MOD} + SHIFT,n,movewindow,l + bind=${MOD} + SHIFT,s,movewindow,r + bind=${MOD} + SHIFT,l,movewindow,u + bind=${MOD} + SHIFT,r,movewindow,d - bind=${MOD} + SHIFT,n,movewindow,l - bind=${MOD} + SHIFT,s,movewindow,r - bind=${MOD} + SHIFT,l,movewindow,u - bind=${MOD} + SHIFT,r,movewindow,d - - bind=${MOD},comma,workspace,-1 - bind=${MOD},period,workspace,+1 + bind=${MOD},comma,workspace,-1 + bind=${MOD},period,workspace,+1 - bind=${MOD},b,exec,firefox - bind=${MOD},t,exec,kitty - bind=${MOD} + SHIFT,Escape,exit + bind=${MOD},b,exec,firefox + bind=${MOD},t,exec,kitty + bind=${MOD} + SHIFT,Escape,exit + #fix xwayland hidpi + exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 + env = GDK_SCALE,2 + env = XCURSOR_SIZE,48 - workspace = eDP-1, 42 + workspace = eDP-1, 42 - exec-once=bash -c "waybar >/tmp/waybar_error.log" + exec-once=bash -c "waybar >/tmp/waybar_error.log" '' + builtins.concatStringsSep "\n" (map ( x: '' diff --git a/flake.lock b/flake.lock index 0c065e8..5e67161 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ ] }, "locked": { - "lastModified": 1677969766, - "narHash": "sha256-AIp/ZYZMNLDZR/H7iiAlaGpu4lcXsVt9JQpBlf43HRY=", + "lastModified": 1680281360, + "narHash": "sha256-XdLTgAzjJNDhAG2V+++0bHpSzfvArvr2pW6omiFfEJk=", "owner": "ryantm", "repo": "agenix", - "rev": "03b51fe8e459a946c4b88dcfb6446e45efb2c24e", + "rev": "e64961977f60388dd0b49572bb0fc453b871f896", "type": "github" }, "original": { @@ -60,12 +60,15 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -103,11 +106,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1680114304, - "narHash": "sha256-XymtLu8G2nzenjDUWI7XV2MMHztvPkEZUFpwmZFcxVM=", + "lastModified": 1681250798, + "narHash": "sha256-fQMROyKzPFBPqJy9J4ffywm02ZuqAI0GW1O1QibVpdQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "0e065e1b6f0776ebbacea9dcbc977af7bc9eddc0", + "rev": "28698126bd825aff21cae9ffd15cf83e169051b0", "type": "github" }, "original": { @@ -124,11 +127,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1680132864, - "narHash": "sha256-KcgGLM0za/04IFKz0Afz/T1NGUWhmnSJDTIip/CzNOo=", + "lastModified": 1681303095, + "narHash": "sha256-0lj5ZGMhXdeYbbQQ5Y0fv0OcKe0zXfn4H2VOn31l/9o=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "b88de63abb41bfb8c07638e6277982503638c29d", + "rev": "efee6a1cda278b8589bfe335c66d8fb272027bca", "type": "github" }, "original": { @@ -145,11 +148,11 @@ ] }, "locked": { - "lastModified": 1671839510, - "narHash": "sha256-+PY1qqJfmZzzROgcIY4I7AkCwpnC+qBIYk2eFoA9RWc=", + "lastModified": 1681065697, + "narHash": "sha256-QPzwwlGKX95tl6ZEshboZbEwwAXww6lNLdVYd6T9Mrc=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "b8f55e02a328c47ed373133c52483bbfa20a1b75", + "rev": "4d29e48433270a2af06b8bc711ca1fe5109746cd", "type": "github" }, "original": { @@ -160,11 +163,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1679172431, - "narHash": "sha256-XEh5gIt5otaUbEAPUY5DILUTyWe1goAyeqQtmwaFPyI=", + "lastModified": 1680669251, + "narHash": "sha256-AVNE+0u4HlI3v96KCXE9risH7NKqj0QDLLfSckYXIbA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1603d11595a232205f03d46e635d919d1e1ec5b9", + "rev": "9c8ff8b426a8b07b9e0a131ac3218740dc85ba1e", "type": "github" }, "original": { @@ -192,11 +195,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1679944645, - "narHash": "sha256-e5Qyoe11UZjVfgRfwNoSU57ZeKuEmjYb77B9IVW7L/M=", + "lastModified": 1681217261, + "narHash": "sha256-RbxCHWN3Vhyv/WEsXcJlDwF7bpvZ9NxDjfSouQxXEKo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4bb072f0a8b267613c127684e099a70e1f6ff106", + "rev": "3fb8eedc450286d5092e4953118212fa21091b3b", "type": "github" }, "original": { @@ -219,11 +222,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1678976941, - "narHash": "sha256-skNr08frCwN9NO+7I77MjOHHAw+L410/37JknNld+W4=", + "lastModified": 1681227715, + "narHash": "sha256-kQZOoTa177VF5uk1JK7bA9ZTU5g6d5IuDp/6YdxUWao=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "32b1dbedfd77892a6e375737ef04d8efba634e9e", + "rev": "c77e64a5adab96866ea97449a5a7a327d4629828", "type": "github" }, "original": { @@ -243,6 +246,21 @@ "templates": "templates" } }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "templates": { "locked": { "lastModified": 1679299625, @@ -260,11 +278,11 @@ }, "utils": { "locked": { - "lastModified": 1676283394, - "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", "owner": "numtide", "repo": "flake-utils", - "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", "type": "github" }, "original": { @@ -277,11 +295,11 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1679340088, - "narHash": "sha256-/1KiYoBivDj8HC/eVK2Tr2WYkVdKJxq2Lb0tQs0qqJo=", + "lastModified": 1680810405, + "narHash": "sha256-LmI/4Yp/pOOoI4RxLRx9I90NBsiqdRLVOfbATKlgpkg=", "owner": "wlroots", "repo": "wlroots", - "rev": "1d64e12391a638201c679e71d4e22bb45e5faa8e", + "rev": "7abda952d0000b72d240fe1d41457b9288f0b6e5", "type": "gitlab" }, "original": { @@ -303,11 +321,11 @@ ] }, "locked": { - "lastModified": 1673116118, - "narHash": "sha256-eR0yDSkR2XYMesfdRWJs25kAdXET2mbNNHu5t+KUcKA=", + "lastModified": 1681127512, + "narHash": "sha256-vklOOhBj5W8fii6yN4L2WY5ZeifBmsq3+mJ2wC1Pk9U=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "d479c846531fd0e1d2357c9588b8310a2b859ef2", + "rev": "04f579377a32781ce57c9cf4ba2a5bcb7f53fa97", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a2e1095..50cfc9d 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,6 @@ templates.flake = templates; }; } - hyprland.nixosModules.default ]; }; } diff --git a/modules/hyprland.nix b/modules/hyprland.nix deleted file mode 100644 index 4865ca0..0000000 --- a/modules/hyprland.nix +++ /dev/null @@ -1,8 +0,0 @@ -{pkgs, ...}: { - programs.hyprland = { - enable = true; - # Users should provide their own package - package = null; - }; - xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-wlr]; -} diff --git a/users/common/graphical/hyprland.nix b/users/common/graphical/hyprland.nix index 2ae8d06..f922996 100644 --- a/users/common/graphical/hyprland.nix +++ b/users/common/graphical/hyprland.nix @@ -56,6 +56,7 @@ in { wayland.windowManager.hyprland = { enable = true; + xwayland.hidpi = true; nvidiaPatches = true; extraConfig = import ../../../data/hyprland/config.nix MOD TAGS pkgs; }; diff --git a/users/common/shells/zsh.nix b/users/common/shells/zsh.nix index 5908909..906a26a 100644 --- a/users/common/shells/zsh.nix +++ b/users/common/shells/zsh.nix @@ -45,8 +45,8 @@ src = pkgs.fetchFromGitHub { owner = "zdharma-continuum"; repo = "fast-syntax-highlighting"; - rev = "371591a7b6f0f3c9501c52a7b566addbfd804d09"; - sha256 = "125kp7rzq9yf565h6crkr8fyvrz867jjwlx0w2dbhas9p1id978l"; + rev = "13d7b4e63468307b6dcb2dadf6150818f242cbff"; + sha256 = "0ghzqg1xfvqh9z23aga7aafrpxbp9bpy1r8vk4avi6b80p3iwsq2"; }; } ];