From 9580f6c42af2535dc7890edb681ead090f5105f2 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 19 Feb 2022 04:20:00 +0000 Subject: [PATCH] zellij: add configuration for darwin Zellij uses a different path to hold its configuration on Darwin. --- modules/programs/zellij.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/programs/zellij.nix b/modules/programs/zellij.nix index 6fdfb49e..2cfa625d 100644 --- a/modules/programs/zellij.nix +++ b/modules/programs/zellij.nix @@ -7,6 +7,11 @@ let cfg = config.programs.zellij; yamlFormat = pkgs.formats.yaml { }; + configDir = if pkgs.stdenv.isDarwin then + "Library/Application Support/org.Zellij-Contributors.Zellij" + else + "${config.xdg.configHome}/zellij"; + in { meta.maintainers = [ hm.maintainers.mainrs ]; @@ -44,7 +49,7 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; - xdg.configFile."zellij/config.yaml" = mkIf (cfg.settings != { }) { + home.file."${configDir}/config.yaml" = mkIf (cfg.settings != { }) { source = yamlFormat.generate "zellij.yaml" cfg.settings; }; };