diff --git a/common/tooling/default.nix b/common/tooling/default.nix index 234b36f..673c537 100644 --- a/common/tooling/default.nix +++ b/common/tooling/default.nix @@ -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 = ""; }; }; diff --git a/common/tooling/helix.nix b/common/tooling/helix.nix index a419f8b..3997bcb 100644 --- a/common/tooling/helix.nix +++ b/common/tooling/helix.nix @@ -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"; }; }; diff --git a/common/tooling/nix.nix b/common/tooling/nix.nix index e5871f0..46a5a10 100644 --- a/common/tooling/nix.nix +++ b/common/tooling/nix.nix @@ -41,5 +41,5 @@ }; # nix.package = pkgs.nixVersions.latest; - nix.optimise.automatic = true; + # nix.optimise.automatic = true; } diff --git a/common/tooling/ranger.nix b/common/tooling/ranger.nix new file mode 100644 index 0000000..3ac6bf5 --- /dev/null +++ b/common/tooling/ranger.nix @@ -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)); + }; + }; +} diff --git a/fake_flake.nix b/fake_flake.nix index dec3424..d4ee59c 100644 --- a/fake_flake.nix +++ b/fake_flake.nix @@ -132,6 +132,7 @@ in _module.args = { system = "x86_64-linux"; + inputs = nivSources; }; nix.settings.extra-substituters = [ diff --git a/nix/sources.json b/nix/sources.json index 8bd557b..f043bde 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -88,5 +88,11 @@ "type": "tarball", "url": "https://github.com/NixOS/nixpkgs/archive/bfb7a882678e518398ce9a31a881538679f6f092.tar.gz", "url_template": "https://github.com///archive/.tar.gz" + }, + "ranger_udisk_menu": { + "branch": "master", + "repo": "https://git.grimmauld.de/Grimmauld/ranger_udisk_menu.git", + "rev": "981756147834bb485ebcfa0e41ad60d05ccc4351", + "type": "git" } } diff --git a/overlays/default.nix b/overlays/default.nix index 6a6de7b..ad8efb4 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -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 ]; } diff --git a/overlays/glibc-eac.nix b/overlays/glibc-eac.nix index ea29097..e897ee7 100644 --- a/overlays/glibc-eac.nix +++ b/overlays/glibc-eac.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; }); } diff --git a/overlays/ranger.nix b/overlays/ranger.nix new file mode 100644 index 0000000..a0523a6 --- /dev/null +++ b/overlays/ranger.nix @@ -0,0 +1,11 @@ +{ prev, ... }: +{ + ranger = prev.ranger.overrideAttrs (oldAttrs: { + propagatedBuildInputs = + (oldAttrs.propagatedBuildInputs or [ ]) + ++ (with prev; [ + udisks + util-linux + ]); + }); +} diff --git a/users.nix b/users.nix index a37f3da..073bdf1 100644 --- a/users.nix +++ b/users.nix @@ -38,8 +38,7 @@ packages = lib.optionals config.grimmShared.graphical ( with pkgs; [ - webcord - discord + vesktop obs-studio element-desktop ghidra