1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-03 16:39:46 +01:00

zellij: add configuration for darwin

Zellij uses a different path to hold its configuration on Darwin.
This commit is contained in:
Mario Rodas 2022-02-19 04:20:00 +00:00 committed by Robert Helgesson
parent 8db712a6a2
commit 9580f6c42a
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -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;
};
};