From 2acb68a89d3a6e5cba45a44ad6943bd3ee32dc79 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 29 May 2024 01:53:08 +0200 Subject: [PATCH] north 28 --- configuration.nix | 7 ++++-- flake.lock | 50 +++++++++++++++++++------------------- flake.nix | 1 + home-modules/git.nix | 18 +++++++++++++- home-modules/yazi.nix | 56 +++++++++++++++++++++++++++++++++++++++---- home.nix | 1 + 6 files changed, 101 insertions(+), 32 deletions(-) diff --git a/configuration.nix b/configuration.nix index b061b1d..56c364d 100755 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, host, allowed, secrets, rice, nvidia, ... }: +{ config, lib, pkgs, pkgs-unstable, user, host, allowed, secrets, rice, nvidia, ... }: let in { @@ -62,6 +62,7 @@ in # $ nix search wget environment.systemPackages = with pkgs; [ git + lazygit # home-manager module is bugged git-crypt wget curl @@ -77,7 +78,9 @@ in blueman dmidecode file - ]; + ] ++ (with pkgs-unstable; [ + sendme + ]); fonts.packages = with pkgs; [ diff --git a/flake.lock b/flake.lock index baded52..f486732 100755 --- a/flake.lock +++ b/flake.lock @@ -42,11 +42,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1716264197, - "narHash": "sha256-ryPizz6evZsfAjFjUWgxCVzBZ9m1BDVKlMomOHze8VE=", + "lastModified": 1716782615, + "narHash": "sha256-/Awpe+K8Npq35mhPw3gj+X/phWrvjXCEgbraxmtBlIU=", "owner": "rycee", "repo": "nur-expressions", - "rev": "cccd903ebbe5837579d6746ac430beec60d96c19", + "rev": "33111902039a1a779aef5574c7262dd8e9d688ae", "type": "gitlab" }, "original": { @@ -155,11 +155,11 @@ ] }, "locked": { - "lastModified": 1715381426, - "narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=", + "lastModified": 1716729592, + "narHash": "sha256-Y3bOjoh2cFBqZN0Jw1zUdyr7tjygyxl2bD/QY73GZP0=", "owner": "nix-community", "repo": "home-manager", - "rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4", + "rev": "2c78a57c544dd19b07442350727ced097e1aa6e6", "type": "github" }, "original": { @@ -185,11 +185,11 @@ ] }, "locked": { - "lastModified": 1715791817, - "narHash": "sha256-J069Uhv/gCMFLX1dSh2f+9ZTM09r1Nv3oUfocCnWKow=", + "lastModified": 1716576411, + "narHash": "sha256-FIN1wMoyePBTtibCbaeJaoKNLuAYIGwLCWAYC1DJanw=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "7c3aa03dffb53921e583ade3d4ae3f487e390e7e", + "rev": "57298fc4f13c807e50ada2c986a3114b7fc2e621", "type": "github" }, "original": { @@ -208,11 +208,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1716316196, - "narHash": "sha256-ynu+Ii1PTtnz4YdjP2CJbnxaie9aETNAds9lwDzeQus=", + "lastModified": 1716801877, + "narHash": "sha256-vfMb7opO2xva0jt/UwMGlyjK4DB73SWxus4Oryww+C8=", "ref": "refs/heads/main", - "rev": "e419ef1873de01b0762f7f1a411994170a4d8cab", - "revCount": 4723, + "rev": "db5d39a66f1285f78321d953eac398feaedfc63d", + "revCount": 4744, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -287,11 +287,11 @@ ] }, "locked": { - "lastModified": 1715791527, - "narHash": "sha256-HhQ4zvGHrRjR63ltySSeg+x+0jb0lepiutWdnFhLRoo=", + "lastModified": 1716473782, + "narHash": "sha256-+qLn4lsHU6iL3+HTo1gTQ1tWzet8K9h+IfVemzEQZj8=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "969cb076e5b76f2e823aeca1937a3e1f159812ee", + "rev": "87d5d984109c839482b88b4795db073eb9ed446f", "type": "github" }, "original": { @@ -352,11 +352,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", + "lastModified": 1716330097, + "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", + "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2", "type": "github" }, "original": { @@ -384,11 +384,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1716137900, - "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", + "lastModified": 1716509168, + "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1", + "rev": "bfb7a882678e518398ce9a31a881538679f6f092", "type": "github" }, "original": { @@ -415,11 +415,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1716218643, - "narHash": "sha256-i/E7gzQybvcGAYDRGDl39WL6yVk30Je/NXypBz6/nmM=", + "lastModified": 1716633019, + "narHash": "sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a8695cbd09a7ecf3376bd62c798b9864d20f86ee", + "rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 11d374f..b371238 100755 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,7 @@ url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; }; + # yazi.url = "github:sxyazi/yazi"; }; outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs: diff --git a/home-modules/git.nix b/home-modules/git.nix index 996656a..2622e48 100755 --- a/home-modules/git.nix +++ b/home-modules/git.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, system, user, allowed, secrets, ... }: +{ pkgs, lib, user, rice, ... }: lib.mkIf (user != "tv") { home.packages = with pkgs; [ @@ -50,4 +50,20 @@ lib.mkIf (user != "tv") }; }; }; + programs.lazygit = { + enable = true; + settings = { + windowSize = "normal"; + gui.theme = with rice.color; { + lightTheme = false; + activeBorderColor = [ border "bold"]; + inactiveBorderColor = [ black.bright ]; + optionsTextColor = [ blue.base ]; + selectedLineBgColor = [ foreground ]; + selectedRangeByColor = [ magenta.bright ]; + showRandomTip = true; + animateExplosion = true; + }; + }; + }; } diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index b715e04..e4a3f2a 100755 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -1,13 +1,16 @@ -{ config, pkgs, lib, system, user, allowed, secrets, ... }: +{ pkgs, lib, system, user, inputs, ... }: lib.mkIf (user != "tv") { - home.packages = [ - pkgs.yazi - ]; + home.packages = with pkgs; [ + yazi + dragon + unar + ]; programs.yazi = { enable = true; + # package = inputs.yazi.packages.${system}.default; enableFishIntegration = true; settings = { manager = { @@ -19,6 +22,10 @@ lib.mkIf (user != "tv") linemode = "size"; show_hidden = false; show_symlink = true; + append_keymap = [ + { on = [ "" ]; run = "lazygit"; desc = "Run Lazygit in current directory"; } + { on = [ "" ]; exec = ''shell 'dragon -x -i -T "$1"' --confirm''; } + ]; }; opener = { edit = [ @@ -45,10 +52,51 @@ lib.mkIf (user != "tv") { exec = ''zathura "$@"''; desc = "zathura"; } { exec = ''firefox "$@"''; desc = "firefox"; } ]; + browser = [ + { exec = ''firefox "$@"''; desc = "firefox"; } + ]; + office = [ + { exec = ''libreoffice "$@"''; desc = "libreoffice"; } + { exec = ''libreoffice --view "$@"''; desc = "libreoffice read-only"; } + ]; + shell = [ + { exec = ''sh -c "$@"''; desc = "sh -c"; } + { exec = ''bash -c "$@"''; desc = "bash -c"; } + ]; + python = [ + { exec = ''python "$@"''; desc = "python"; } + ]; }; open.rules = [ { mime = "text/*"; use = "edit"; } + { mime = "text/plain"; use = "edit"; } + { mime = "text/html"; use = ["edit" "browser"]; } + { mime = "text/htm"; use = ["edit" "browser"]; } + { mime = "application/x-httpd-php"; use = ["edit" "browser"]; } + { mime = "application/json"; use = "edit"; } + { mime = "application/ld+json"; use = "edit"; } { mime = "image/*"; use = "image"; } + { mime = "image/svg"; use = ["image" "edit"]; } + { mime = "application/pdf"; use = "document"; } + { mime = "application/epub"; use = "document"; } + { mime = "video/*"; use = "video"; } + { mime = "application/vnd.oasis.opendocument.*"; use = "office"; } + { mime = "application/vnd.ms-powerpoint"; use = "office"; } + { mime = "application/vnd.ms-excel"; use = "office"; } + { mime = "application/vnd.openxmlformats-officedocument.*"; use = ["office" "edit"]; } + { mime = "application/rtf"; use = "office"; } + { mime = "application/x-sh"; use = ["edit" "shell"]; } + { mime = "application/x-python-code"; use = "python"; } + { mime = "text/x-python"; use = "python"; } + { mime = "application/xml"; use = "edit"; } + { mime = "application/xul"; use = "edit"; } + { mime = "application/x-bzip"; use = "archive"; } + { mime = "application/x-bzip2"; use = "archive"; } + { mime = "application/gzip"; use = "archive"; } + { mime = "application/vnd.rar"; use = "archive"; } + { mime = "application/x-tar"; use = "archive"; } + { mime = "application/zip"; use = "archive"; } + { mime = "application/x-7z-compressed"; use = "archive"; } ]; }; }; diff --git a/home.nix b/home.nix index 1f4d9ce..577f18e 100755 --- a/home.nix +++ b/home.nix @@ -70,6 +70,7 @@ pavucontrol fontpreview gtk2fontsel lynx bat du-dust eza neofetch tldr fzf figlet ripgrep lolcat jq glow brightnessctl wev + piper-tts sssnake pipes dig