Skip to content

Commit

Permalink
Merge pull request #63 from Anomalocaridid/fix-vesktop-settings
Browse files Browse the repository at this point in the history
fix: fix vesktop settings and state file creation
  • Loading branch information
KaylorBen authored Jan 2, 2025
2 parents c007255 + 329edb2 commit d5f2fbe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions docs/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,8 @@ programs.nixcord.parseRules.fakeEnums.four
```
## settings.json and state.json control
>[!WARNING]
> Due to Vencord/Vesktop#220 this will not be possible without upstream changes.
> Anyways the options are provided in case you figure something out or want to PR
> Messing with these will likely cause issues since nix store is read only
> Due to Vencord/Vesktop#220 this will not work unless you are using a version of nixpkgs later than 24.11
> Otherwise, messing with these will likely cause issues since nix store is read only
```nix
programs.nixcord.discord.settings
# Settings to be placed in discord.configDir/settings.json
Expand Down
10 changes: 6 additions & 4 deletions hm-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,15 @@ in
}
# Vesktop Client Settings
(mkIf (cfg.vesktop.settings != { }) {
home.file."${cfg.vesktop.configDir}/settings.json".text =
builtins.toJSON mkVencordCfg cfg.vesktopSettings;
home.file."${cfg.vesktop.configDir}/settings.json".text = builtins.toJSON (
mkVencordCfg cfg.vesktop.settings
);
})
# Vesktop Client State
(mkIf (cfg.vesktop.state != { }) {
home.file."${cfg.vesktop.configDir}/state.json".text =
builtins.toJSON mkVencordCfg cfg.vesktopState;
home.file."${cfg.vesktop.configDir}/state.json".text = builtins.toJSON (
mkVencordCfg cfg.vesktop.state
);
})
]))
# Warnings
Expand Down

0 comments on commit d5f2fbe

Please sign in to comment.