mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-05 16:41:04 +01:00
jujutsu: evaluate the settings after merging with other options (#6775)
* jujutsu: evaluate the settings after merging with other options * jujutsu: add ediff to the test
This commit is contained in:
parent
f1ffd097e7
commit
da624eaad0
2 changed files with 22 additions and 17 deletions
|
|
@ -66,10 +66,9 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
home.file."${configDir}/jj/config.toml" = mkIf (cfg.settings != { }) {
|
||||
source = tomlFormat.generate "jujutsu-config" (
|
||||
cfg.settings
|
||||
// lib.optionalAttrs (cfg.ediff) (
|
||||
programs.jujutsu.settings = lib.mkMerge [
|
||||
(lib.mkIf cfg.ediff {
|
||||
merge-tools.ediff =
|
||||
let
|
||||
emacsDiffScript = pkgs.writeShellScriptBin "emacs-ediff" ''
|
||||
set -euxo pipefail
|
||||
|
|
@ -77,18 +76,19 @@ in
|
|||
'';
|
||||
in
|
||||
{
|
||||
merge-tools.ediff = {
|
||||
program = lib.getExe emacsDiffScript;
|
||||
merge-args = [
|
||||
"$left"
|
||||
"$right"
|
||||
"$base"
|
||||
"$output"
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
program = lib.getExe emacsDiffScript;
|
||||
merge-args = [
|
||||
"$left"
|
||||
"$right"
|
||||
"$base"
|
||||
"$output"
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
home.file."${configDir}/jj/config.toml" = mkIf (cfg.settings != { }) {
|
||||
source = tomlFormat.generate "jujutsu-config" cfg.settings;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue