nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit c0ce76adf7da978758a1e0463281c71419bcdf59
parent a6614868f6bb107d80770012a0e1ee1cc8ea4493
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Fri,  7 Aug 2020 15:36:45 +0300

Cleanup modules

Diffstat:
Mmodules/home-manager/programs/aerc.nix | 11++++++-----
Mmodules/home-manager/programs/nnn.nix | 4+++-
2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/modules/home-manager/programs/aerc.nix b/modules/home-manager/programs/aerc.nix @@ -3,6 +3,7 @@ with lib; let cfg = config.programs.aerc; + configDir = "${config.xdg.configHome}/aerc"; accountConfFile = with cfg; generators.toINI @@ -21,12 +22,12 @@ let }; }; - activationScript = with config.xdg; '' - $DRY_RUN_CMD install -Dm644 ${pkgs.aerc}/share/aerc/aerc.conf -t ${configHome}/aerc - $DRY_RUN_CMD install -Dm644 ${pkgs.aerc}/share/aerc/binds.conf -t ${configHome}/aerc + activationScript = '' + $DRY_RUN_CMD install -Dm644 ${pkgs.aerc}/share/aerc/aerc.conf -t ${configDir} + $DRY_RUN_CMD install -Dm644 ${pkgs.aerc}/share/aerc/binds.conf -t ${configDir} '' + optionalString (cfg.gUsername != "" && cfg.gPassword != "") '' - $DRY_RUN_CMD eval "echo '${accountConfFile}' > ${configHome}/aerc/accounts.conf" - $DRY_RUN_CMD chmod 600 ${configHome}/aerc/accounts.conf + $DRY_RUN_CMD eval "echo '${accountConfFile}' > ${configDir}/accounts.conf" + $DRY_RUN_CMD chmod 600 ${configDir}/accounts.conf ''; in { diff --git a/modules/home-manager/programs/nnn.nix b/modules/home-manager/programs/nnn.nix @@ -3,6 +3,8 @@ with lib; let cfg = config.programs.nnn; + configDir = "${config.xdg.configHome}/nnn"; + pluginDir = "${configDir}/plugins"; in { meta.maintainers = [ maintainers.sikmir ]; @@ -36,7 +38,7 @@ in ( mkIf (cfg.pluginsPackage != null) { - xdg.configFile."nnn/plugins".source = + home.file."${pluginDir}".source = "${cfg.pluginsPackage}/share/nnn/plugins"; } )