improve ranger tooling
This commit is contained in:
parent
e64967fa76
commit
995c410cd7
10 changed files with 69 additions and 10 deletions
|
@ -25,6 +25,7 @@ in
|
|||
./git.nix
|
||||
./c.nix
|
||||
./java.nix
|
||||
./ranger.nix
|
||||
];
|
||||
|
||||
config = mkIf (enable && tooling.enable) {
|
||||
|
@ -51,7 +52,6 @@ in
|
|||
|
||||
fbcat
|
||||
gomuks
|
||||
ranger
|
||||
|
||||
imagemagick
|
||||
nmap
|
||||
|
@ -70,6 +70,8 @@ in
|
|||
":q" = "exit";
|
||||
"ls" = "eza";
|
||||
"lix" = "nix";
|
||||
"l" = "eza -hla";
|
||||
"vi" = "hx";
|
||||
"bat" = "bat --theme=Dracula";
|
||||
};
|
||||
|
||||
|
@ -108,6 +110,7 @@ in
|
|||
command = "basename $SHELL";
|
||||
when = "test -v SHELL";
|
||||
format = " in [$output]($style)";
|
||||
# ignore_timeout = true;
|
||||
};
|
||||
# env_var.SHELL = {variable = "SHELL"; default = ""; };
|
||||
};
|
||||
|
|
|
@ -56,10 +56,13 @@ in
|
|||
{
|
||||
config = mkIf (enable && tooling.enable) {
|
||||
environment.systemPackages = [ helix-wrapped ];
|
||||
environment.sessionVariables.EDITOR = getExe helix;
|
||||
environment.sessionVariables.EDITOR = getExe helix-wrapped;
|
||||
|
||||
programs.helix.config = {
|
||||
theme = "catppuccin_mocha";
|
||||
editor.cursor-shape.insert = "bar";
|
||||
theme = "base16_transparent";
|
||||
# editor.commands.git = ":sh git";
|
||||
# keys.normal.Delete = "delete_selection";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -41,5 +41,5 @@
|
|||
};
|
||||
|
||||
# nix.package = pkgs.nixVersions.latest;
|
||||
nix.optimise.automatic = true;
|
||||
# nix.optimise.automatic = true;
|
||||
}
|
||||
|
|
30
common/tooling/ranger.nix
Normal file
30
common/tooling/ranger.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.grimmShared) enable tooling;
|
||||
inherit (lib) mkIf mapAttrs' concatLines attrNames;
|
||||
plugins = {
|
||||
ranger_udisk_menu = 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));
|
||||
};
|
||||
};
|
||||
}
|
|
@ -132,6 +132,7 @@ in
|
|||
|
||||
_module.args = {
|
||||
system = "x86_64-linux";
|
||||
inputs = nivSources;
|
||||
};
|
||||
|
||||
nix.settings.extra-substituters = [
|
||||
|
|
|
@ -88,5 +88,11 @@
|
|||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/bfb7a882678e518398ce9a31a881538679f6f092.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"ranger_udisk_menu": {
|
||||
"branch": "master",
|
||||
"repo": "https://git.grimmauld.de/Grimmauld/ranger_udisk_menu.git",
|
||||
"rev": "981756147834bb485ebcfa0e41ad60d05ccc4351",
|
||||
"type": "git"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.ccache.packageNames = [
|
||||
"agenix"
|
||||
|
@ -17,6 +22,7 @@
|
|||
prev
|
||||
lib
|
||||
config
|
||||
inputs
|
||||
;
|
||||
})
|
||||
)
|
||||
|
@ -32,5 +38,6 @@
|
|||
./rfindup.nix
|
||||
./glibc-eac.nix
|
||||
./factorio.nix
|
||||
./ranger.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{ prev, ... }:
|
||||
{ prev, inputs, ... }:
|
||||
let
|
||||
nivSources = import ../nix/sources.nix;
|
||||
glibc_patches = [ "rogue_company_reverts.patch" ];
|
||||
in
|
||||
{
|
||||
|
@ -12,7 +11,7 @@ in
|
|||
in
|
||||
if oldPatches == null then [ ] else oldPatches
|
||||
)
|
||||
++ (map (p: "${nivSources.glibc-eac}/${p}") glibc_patches);
|
||||
++ (map (p: "${inputs.glibc-eac}/${p}") glibc_patches);
|
||||
doCheck = false;
|
||||
});
|
||||
}
|
||||
|
|
11
overlays/ranger.nix
Normal file
11
overlays/ranger.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ prev, ... }:
|
||||
{
|
||||
ranger = prev.ranger.overrideAttrs (oldAttrs: {
|
||||
propagatedBuildInputs =
|
||||
(oldAttrs.propagatedBuildInputs or [ ])
|
||||
++ (with prev; [
|
||||
udisks
|
||||
util-linux
|
||||
]);
|
||||
});
|
||||
}
|
|
@ -38,8 +38,7 @@
|
|||
packages = lib.optionals config.grimmShared.graphical (
|
||||
with pkgs;
|
||||
[
|
||||
webcord
|
||||
discord
|
||||
vesktop
|
||||
obs-studio
|
||||
element-desktop
|
||||
ghidra
|
||||
|
|
Loading…
Reference in a new issue