From 6738c49c09dff11ffa92219e5a9c5c6c4db4ac99 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Fri, 31 Jan 2025 17:39:12 +0100 Subject: [PATCH] Add nnn config, add nurl. --- hosts/nixos/home.nix | 1 + modules/home-manager/default.nix | 9 +++++- modules/home-manager/nnn.nix | 51 ++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 modules/home-manager/nnn.nix diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix index d925e05..b0bf96e 100644 --- a/hosts/nixos/home.nix +++ b/hosts/nixos/home.nix @@ -23,6 +23,7 @@ sesh stress-ng dmidecode + nurl ]; # Install librewolf diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 922fa2e..8795ec4 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,8 +1,15 @@ {lib, ...}: { - imports = [./mangohud.nix ./neovim.nix ./zsh.nix ./tmux.nix]; + imports = [ + ./mangohud.nix + ./neovim.nix + ./zsh.nix + ./tmux.nix + ./nnn.nix + ]; crony.mangohud.enable = lib.mkDefault true; crony.neovim.enable = lib.mkDefault true; crony.zsh.enable = lib.mkDefault true; crony.tmux.enable = lib.mkDefault true; + crony.nnn.enable = lib.mkDefault true; } diff --git a/modules/home-manager/nnn.nix b/modules/home-manager/nnn.nix new file mode 100644 index 0000000..145f281 --- /dev/null +++ b/modules/home-manager/nnn.nix @@ -0,0 +1,51 @@ +{ + config, + lib, + pkgs, + ... +}: { + options = { + crony.nnn.enable = lib.mkEnableOption "Enable nnn and customize it for me."; + }; + + config = lib.mkIf config.crony.nnn.enable { + # NNN Settings + programs.nnn = { + enable = true; + package = pkgs.nnn.override {withNerdIcons = true;}; + bookmarks = { + d = "~/Documents"; + D = "~/Downloads"; + p = "~/Pictures"; + v = "~/Videos"; + }; + extraPackages = with pkgs; [ + pmount + ffmpegthumbnailer + mediainfo + ueberzugpp + poppler_utils + gnome-epub-thumbnailer + nsxiv + ]; + plugins.mappings = { + u = "nmount"; + c = "chksum"; + r = "gitroot"; + v = "imgview"; + m = "mtpmount"; + d = "xdgdefault"; + x = "togglex"; + p = "preview-tui"; + }; + plugins.src = + (pkgs.fetchFromGitHub { + owner = "jarun"; + repo = "nnn"; + rev = "62c84dd2549770e15c70328863a63da4fd2da2f9"; + hash = "sha256-Q/p4+v0sthcsmi8/EoAVT4dNl+hZNKZM4fjhffMpato="; + }) + + "/plugins"; + }; + }; +}