From 81edee8b5fce10211c767d53f4454daec9d6b8c8 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:47:12 +0400 Subject: [PATCH] add ranger and okular --- config/ranger/rifle.conf | 1 + config/ranger/rifle.conf~ | 0 modules/shell/ranger/default.nix | 26 +++++++++++++++++++++----- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 config/ranger/rifle.conf create mode 100644 config/ranger/rifle.conf~ diff --git a/config/ranger/rifle.conf b/config/ranger/rifle.conf new file mode 100644 index 00000000..503b31de --- /dev/null +++ b/config/ranger/rifle.conf @@ -0,0 +1 @@ +ext pdf = okular "$@" \ No newline at end of file diff --git a/config/ranger/rifle.conf~ b/config/ranger/rifle.conf~ new file mode 100644 index 00000000..e69de29b diff --git a/modules/shell/ranger/default.nix b/modules/shell/ranger/default.nix index 3c06d3ff..3e627b38 100644 --- a/modules/shell/ranger/default.nix +++ b/modules/shell/ranger/default.nix @@ -1,9 +1,14 @@ -{ outputs, options, config, lib, pkgs, ...}: -with lib; -let - cfg = config.modules.shell.ranger; -in { + outputs, + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.modules.shell.ranger; +in { options.modules.shell.ranger = { enable = mkEnableOption false; }; @@ -11,6 +16,17 @@ in config = mkIf cfg.enable { users.users.sako.packages = with pkgs; [ ranger + # pdf viewer + okular ]; + + home-manager.users.sako = {pkgs, ...}: { + xdg.configFile = { + ranger = { + source = ../../../config/ranger; + recursive = true; + }; + }; + }; }; }