44 lines
943 B
Nix
44 lines
943 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
inputs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (config.grimmShared) enable tooling;
|
|
inherit (lib)
|
|
mkIf
|
|
mapAttrs'
|
|
concatLines
|
|
attrNames
|
|
;
|
|
plugins = {
|
|
ranger_udisk_menu = pkgs.fetchFromGitea {
|
|
domain = "git.grimmauld.de";
|
|
owner = "grimmauld";
|
|
repo = "ranger_udisk_menu";
|
|
rev = "981756147834bb485ebcfa0e41ad60d05ccc4351";
|
|
hash = "sha256-5nFpEO/54MO6Esvkcqcyw2TI37ham70LkHtOXrYXfbY=";
|
|
};
|
|
# inputs.ranger_udisk_menu;
|
|
};
|
|
in
|
|
{
|
|
config = mkIf (enable && tooling.enable) {
|
|
services.gvfs = {
|
|
enable = true;
|
|
package = pkgs.gvfs;
|
|
};
|
|
environment.systemPackages = [ pkgs.ranger ];
|
|
|
|
environment.etc =
|
|
(mapAttrs' (n: v: {
|
|
name = "ranger/plugins/${n}";
|
|
value.source = v;
|
|
}) plugins)
|
|
// {
|
|
"ranger/commands.py".text = concatLines (map (n: "from plugins.${n} import *") (attrNames plugins));
|
|
};
|
|
};
|
|
}
|