From 243177409edd096ede9ab8caf8023301814a6270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Gro=C3=9Fmann?= Date: Sat, 11 Mar 2023 18:03:55 +0900 Subject: [PATCH] WIP: hyprland FEAT: iwd for korea FIX: iwd conf location --- configuration.nix | 7 +++- data/hyprland/config | 18 --------- data/hyprland/config.nix | 60 ++++++++++++++++++++++++++++ flake.lock | 4 +- modules/networking.nix | 8 +++- secrets/iwd/kaist.8021x.age | Bin 0 -> 748 bytes users/common/default.nix | 3 -- users/common/graphical/hyprland.nix | 11 ++++- users/patrick.nix | 2 +- 9 files changed, 84 insertions(+), 29 deletions(-) delete mode 100644 data/hyprland/config create mode 100644 data/hyprland/config.nix create mode 100644 secrets/iwd/kaist.8021x.age diff --git a/configuration.nix b/configuration.nix index 83b1e57..eec27e0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -56,7 +56,9 @@ in { rekey.secrets.patrick.file = ./secrets/patrick.passwd.age; - environment.etc.issue.text = "<<< Welcome to NixOS 23.05.20230304.3c5319a (\m) - \l >>>"; + environment.etc.issue.text = '' + <<< Welcome to NixOS 23.05.20230304.3c5319a (\m) - \l >>> + ''; users.motd = "Guten Tach"; # Define a user account. Don't forget to set a password with ‘passwd’. @@ -97,6 +99,9 @@ in { age-plugin-yubikey rage file + ripgrep + killall + fd # xournalpp needs this or else it will crash gnome3.adwaita-icon-theme ]; diff --git a/data/hyprland/config b/data/hyprland/config deleted file mode 100644 index 6ed5060..0000000 --- a/data/hyprland/config +++ /dev/null @@ -1,18 +0,0 @@ -general { - gaps_in = 1 - gaps_out = 0 -} - -input { - sensitivity = -0.7 - kb_layout = de - kb_variant = bone - repeat_rate = 60 - repeat_delay = 235 - # Only change focus on mouse click - follow_mouse = 2 -} - -bind=SUPER,b,exec,firefox -bind=SUPER,t,exec,kitty -bind=SUPER + Shift,esc,exit diff --git a/data/hyprland/config.nix b/data/hyprland/config.nix new file mode 100644 index 0000000..7f6612e --- /dev/null +++ b/data/hyprland/config.nix @@ -0,0 +1,60 @@ +MOD: TAGS: pkgs: +'' + general { + gaps_in = 1 + gaps_out = 0 + } + + input { + sensitivity = -0.8 + kb_model = pc105 + kb_layout = de + kb_variant = bone + repeat_rate = 60 + repeat_delay = 235 + # Only change focus on mouse click + follow_mouse = 2 + } + + # 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},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,n,movewindow,l + bind=${MOD} + Shift,s,movewindow,r + bind=${MOD} + Shift,l,movewindow,u + bind=${MOD} + Shift,r,movewindow,d + + + + + bind=${MOD},b,exec,firefox + bind=${MOD},t,exec,kitty + bind=${MOD} + Shift,Escape,exit +'' ++ builtins.concatStringsSep "\n" (map ( + x: '' + bind=${MOD},${x},workspace,${x} + bind=${MOD} + Shift,${x},movetoworkspace,${x} + '' + ) + TAGS) diff --git a/flake.lock b/flake.lock index d597c39..6a2c7fc 100644 --- a/flake.lock +++ b/flake.lock @@ -247,11 +247,11 @@ "locked": { "lastModified": 1, "narHash": "sha256-b3t2blYgmHf/HXc152Fa7+YKJSS05vRnrs8i+H6SWA8=", - "path": "/nix/store/hjmn6wjprx9h7cfh46h46byffb6y1z6w-source/templates", + "path": "/nix/store/8snyk21w4xs6v6kn1pjhs7n7b7j8s29i-source/templates", "type": "path" }, "original": { - "path": "/nix/store/hjmn6wjprx9h7cfh46h46byffb6y1z6w-source/templates", + "path": "/nix/store/8snyk21w4xs6v6kn1pjhs7n7b7j8s29i-source/templates", "type": "path" } }, diff --git a/modules/networking.nix b/modules/networking.nix index bf7503d..0beb16f 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -2,11 +2,15 @@ networking.wireless.iwd.enable = true; rekey.secrets.eduroam = { file = ../secrets/iwd/eduroam.8021x.age; - path = "/etc/iwd/eduroam.8021x"; + path = "/var/lib/iwd/eduroam.8021x"; }; rekey.secrets.devoloog = { file = ../secrets/iwd/devolo-og.psk.age; - path = "/etc/iwd/devolo-og.psk"; + path = "/var/lib/iwd/devolo-og.psk"; + }; + rekey.secrets.kaist = { + file = ../secrets/iwd/kaist.8021x.age; + path = "/var/lib/iwd/Welcome_KAIST.8021x"; }; networking.useNetworkd = true; diff --git a/secrets/iwd/kaist.8021x.age b/secrets/iwd/kaist.8021x.age new file mode 100644 index 0000000000000000000000000000000000000000..189fba4f441173051fc0568502e9163a11a61b0f GIT binary patch literal 748 zcmY+-S!>e(003Z7M2%Fe_e3yYJ-e7TTaP%ec5S*|X?mJg1+!dD+Z@fBrmc$lA|ew! z&>`X`USo*2^TFvJbRr`7;xSRiCL$RDAUN10Th+5G&DYRVfLwv|3hqxNHTW z^&pAZY*rKu$Hi<`i;5 zh|vh91o^yK5UpV?7P5MzMlae}_3E_*st4Ns4T?~P6vSo+$wV}tbb&5}l}M_XQ$)_6 zmT?W1VKJ4cluMXei(-0!&c|RDvDkRh;si9p+CXWo1r1Z_WRT~nN(9a;cs#+-wJ?{7 zmfOgn;B-3ZRQkUwgYkl22VG`9CVPtMSWHGE#hebyoJX+Z9x@?uk&tfBFjhh>Cc}0I zR{-1|A<7_O)kRq1Dr_(2LV9DVty*#fGr6Sbb~2<#AW~wKs`CFXK8rVPhj^8x+E{S= zwyla8+~fz>fs_viYL%9TM1#;8sk$hl8um!ZQdM&Y362k-80#alX;I)y70Fvbxh&2( zIastKA*JfdFiZ;fR{#KlAkfAnT_j0FqP*B*E5rgZ3iUF!+cm$_@FM^ptb8)P_&NFRY}<~ZnHQ)v;pa_DfQ}h=x(r{_S+^hB zV%%?B)%$9#$uQQV{4$@Gk(cd-%($bgx0&kb*X!4e+`bqbnzrHG^g||snCG2nroP9g zEYjP*Z{9fC_5Oa{plEuwXX?G7c}Icclgfj$hVkLu^@|gxnfdNzCktZ}>V~dKd##{Exw`_7EqNE_70 zrB^ym844$??pXJ?!+HGU)5lYmEV{b6=g7m+-w&=oS*wpe>D+V79$&EY{D;N$uPw)x RixZHyBsA9Y`OLsT-(SlV90&ja literal 0 HcmV?d00001 diff --git a/users/common/default.nix b/users/common/default.nix index 96ce4b1..10f880f 100644 --- a/users/common/default.nix +++ b/users/common/default.nix @@ -14,9 +14,6 @@ home.packages = with pkgs; [ sqlite bat - ripgrep - killall - fd ]; # has to be enabled to support zsh reverse search diff --git a/users/common/graphical/hyprland.nix b/users/common/graphical/hyprland.nix index 736e551..0935750 100644 --- a/users/common/graphical/hyprland.nix +++ b/users/common/graphical/hyprland.nix @@ -1,7 +1,14 @@ -_: { +{ + pkgs, + lib, + ... +}: let + MOD = "SUPER"; + TAGS = map toString (lib.lists.range 1 9); +in { wayland.windowManager.hyprland = { enable = true; nvidiaPatches = true; - extraConfig = builtins.readFile ../../../data/hyprland/config; + extraConfig = import ../../../data/hyprland/config.nix MOD TAGS pkgs; }; } diff --git a/users/patrick.nix b/users/patrick.nix index 83232b4..359ecd9 100644 --- a/users/patrick.nix +++ b/users/patrick.nix @@ -55,7 +55,7 @@ height: 32px !important; } ''; - search.default = "DuckDuckGo"; + search.default = "Kagi"; search.force = true; }; };