From eaa3a62e5595dea11ac5497c07453ea178db73d6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 28 May 2021 00:20:50 -0400 Subject: [PATCH] Use path datatype Mentioned in #19 --- modules/options.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/options.nix b/modules/options.nix index 77d1df25..08861e07 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -6,16 +6,16 @@ with lib.my; options = with types; { user = mkOpt attrs {}; - dotfiles = let t = either str path; in { - dir = mkOpt t + dotfiles = { + dir = mkOpt path (findFirst pathExists (toString ../.) [ "${config.user.home}/.config/dotfiles" "/etc/dotfiles" ]); - binDir = mkOpt t "${config.dotfiles.dir}/bin"; - configDir = mkOpt t "${config.dotfiles.dir}/config"; - modulesDir = mkOpt t "${config.dotfiles.dir}/modules"; - themesDir = mkOpt t "${config.dotfiles.modulesDir}/themes"; + binDir = mkOpt path "${config.dotfiles.dir}/bin"; + configDir = mkOpt path "${config.dotfiles.dir}/config"; + modulesDir = mkOpt path "${config.dotfiles.dir}/modules"; + themesDir = mkOpt path "${config.dotfiles.modulesDir}/themes"; }; home = {