From 45f314f71bc2ba5fb6c60a598bc2942d2b83709f Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sun, 27 Apr 2025 20:27:38 +0800 Subject: [PATCH] feat(home-manager): add udiskie module --- modules/hm/default.nix | 5 ++++- modules/hm/hardware.nix | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 modules/hm/hardware.nix diff --git a/modules/hm/default.nix b/modules/hm/default.nix index ba2d634..bfdac62 100644 --- a/modules/hm/default.nix +++ b/modules/hm/default.nix @@ -10,7 +10,10 @@ let cfg = config."${moduleName}"; in { - imports = [ inputs.home-manager.nixosModules.home-manager ]; + imports = [ + inputs.home-manager.nixosModules.home-manager + ./hardware.nix + ]; options = { "${moduleName}" = { diff --git a/modules/hm/hardware.nix b/modules/hm/hardware.nix new file mode 100644 index 0000000..c8a5ba5 --- /dev/null +++ b/modules/hm/hardware.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: +{ + config = lib.mkMerge [ + (lib.mkIf config."hardware-config".usbAutoMount { + home-manager.users.rafiq.services.udiskie = { + enable = true; + settings = { + # workaround for + # https://github.com/nix-community/home-manager/issues/632 + program_options = { + # replace with your favorite file manager + file_manager = "yazi"; + }; + }; + }; + }) + ]; +}