Skip to content

Commit

Permalink
jujutsu: update module to respect XDG config placement
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnossiom committed Apr 1, 2024
1 parent 30f2ec3 commit 0a90334
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions modules/programs/jujutsu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ in {
settings = mkOption {
type = tomlFormat.type;
default = { };
example = literalExpression ''
{
user = {
name = "John Doe";
email = "jdoe@example.org";
};
}
'';
example = {
user = {
name = "John Doe";
email = "jdoe@example.org";
};
};
description = ''
Options to add to the {file}`.jjconfig.toml` file. See
Options to add to the {file}`config.toml` file. See
<https://github.com/martinvonz/jj/blob/main/docs/config.md>
for options.
'';
Expand All @@ -44,7 +42,7 @@ in {
config = mkIf cfg.enable {
home.packages = [ cfg.package ];

home.file.".jjconfig.toml" = mkIf (cfg.settings != { }) {
xdg.configFile."jj/config.toml" = mkIf (cfg.settings != { }) {
source = tomlFormat.generate "jujutsu-config" cfg.settings;
};
};
Expand Down

0 comments on commit 0a90334

Please sign in to comment.