mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
vesktop: fix config path on darwin (#6889)
This commit is contained in:
parent
97a62d8eef
commit
7ef3137035
1 changed files with 34 additions and 25 deletions
|
|
@ -92,29 +92,38 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
(cfg.package.override { withSystemVencord = cfg.vencord.useSystem; })
|
||||
];
|
||||
xdg.configFile =
|
||||
lib.attrsets.unionOfDisjoint
|
||||
{
|
||||
"vesktop/settings.json".source = jsonFormat.generate "vesktop-settings" cfg.settings;
|
||||
"vesktop/settings/settings.json".source =
|
||||
jsonFormat.generate "vencord-settings" cfg.vencord.settings;
|
||||
}
|
||||
(
|
||||
lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "vesktop/themes/${name}.css" {
|
||||
source =
|
||||
if builtins.isPath value || lib.isStorePath value then
|
||||
value
|
||||
else
|
||||
pkgs.writeText "vesktop-themes-${name}" value;
|
||||
}
|
||||
) cfg.vencord.themes
|
||||
);
|
||||
|
||||
};
|
||||
config = lib.mkIf cfg.enable (
|
||||
let
|
||||
config =
|
||||
lib.attrsets.unionOfDisjoint
|
||||
{
|
||||
"vesktop/settings.json".source = jsonFormat.generate "vesktop-settings" cfg.settings;
|
||||
"vesktop/settings/settings.json".source =
|
||||
jsonFormat.generate "vencord-settings" cfg.vencord.settings;
|
||||
}
|
||||
(
|
||||
lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "vesktop/themes/${name}.css" {
|
||||
source =
|
||||
if builtins.isPath value || lib.isStorePath value then
|
||||
value
|
||||
else
|
||||
pkgs.writeText "vesktop-themes-${name}" value;
|
||||
}
|
||||
) cfg.vencord.themes
|
||||
);
|
||||
in
|
||||
lib.mkMerge [
|
||||
{
|
||||
home.packages = [
|
||||
(cfg.package.override { withSystemVencord = cfg.vencord.useSystem; })
|
||||
];
|
||||
}
|
||||
(lib.mkIf (!pkgs.stdenv.hostPlatform.isDarwin) { xdg.configFile = config; })
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin {
|
||||
home.file = lib.mapAttrs' (n: v: lib.nameValuePair "Library/Application Support/${n}" v) config;
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue