Move some home config to initial basic modules
This commit is contained in:
65
home/modules/nnn/default.nix
Normal file
65
home/modules/nnn/default.nix
Normal file
@ -0,0 +1,65 @@
|
||||
# TODO: Expose some settings
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with mylib.modules; let
|
||||
cfg = config.modules.nnn;
|
||||
in {
|
||||
options.modules.nnn = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nnn = {
|
||||
package = pkgs.nnn.override {
|
||||
# These two are mutually exclusive
|
||||
withIcons = false;
|
||||
withNerdIcons = true;
|
||||
};
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
xdragon # Drag and drop (why man)
|
||||
];
|
||||
|
||||
bookmarks = {
|
||||
c = "~/.config";
|
||||
d = "~/Documents";
|
||||
D = "~/Downloads";
|
||||
n = "~/Notes";
|
||||
t = "~/Notes/TU";
|
||||
h = "~/Notes/HHU";
|
||||
N = "~/NixFlake";
|
||||
p = "~/Pictures";
|
||||
v = "~/Videos";
|
||||
};
|
||||
|
||||
plugins = {
|
||||
mappings = {
|
||||
c = "fzcd";
|
||||
d = "dragdrop";
|
||||
f = "finder";
|
||||
j = "autojump";
|
||||
k = "kdeconnect";
|
||||
p = "preview-tui";
|
||||
# s = "suedit";
|
||||
# s = "x2sel";
|
||||
v = "imgview";
|
||||
};
|
||||
|
||||
src =
|
||||
(pkgs.fetchFromGitHub {
|
||||
owner = "jarun";
|
||||
repo = "nnn";
|
||||
rev = "aaf60b93d741ffff211902a10a159434629bbdb9";
|
||||
sha256 = "sha256-MwI3PqPfSyblURUAds4aVsw8WFBAgbDo5hqXMmRbAW4=";
|
||||
})
|
||||
+ "/plugins";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
9
home/modules/nnn/options.nix
Normal file
9
home/modules/nnn/options.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with mylib.modules; {
|
||||
enable = mkEnableOpt "NNN File Manager";
|
||||
}
|
Reference in New Issue
Block a user