sheldon: fix expression type
This commit is contained in:
parent
a63b850066
commit
fbd892591c
|
@ -5,7 +5,7 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.programs.sheldon;
|
cfg = config.programs.sheldon;
|
||||||
tomlFormat = pkgs.formats.toml { };
|
tomlFormat = pkgs.formats.toml { };
|
||||||
cmd = "${config.home.profileDirectory}/bin/sheldon";
|
sheldonCmd = "${config.home.profileDirectory}/bin/sheldon";
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.Kyure-A ];
|
meta.maintainers = [ maintainers.Kyure-A ];
|
||||||
|
|
||||||
|
@ -46,37 +46,37 @@ in {
|
||||||
source = tomlFormat.generate "sheldon-config" cfg.settings;
|
source = tomlFormat.generate "sheldon-config" cfg.settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bash.initExtra = builtins.concatStringsSep "\n" [
|
programs.bash.initExtra = ''
|
||||||
(mkIf (cfg.settings != { }) ''
|
${optionalString (cfg.settings != { }) ''
|
||||||
eval "$(sheldon source)"
|
eval "$(sheldon source)"
|
||||||
'')
|
''}
|
||||||
(mkIf cfg.enableBashCompletions ''
|
${optionalString cfg.enableBashCompletions ''
|
||||||
if [[ $TERM != "dumb" ]]; then
|
if [[ $TERM != "dumb" ]]; then
|
||||||
eval "$(${cmd} completions --shell=bash)"
|
eval "$(${sheldonCmd} completions --shell=bash)"
|
||||||
fi
|
fi
|
||||||
'')
|
''}
|
||||||
];
|
'';
|
||||||
|
|
||||||
programs.zsh.initExtra = builtins.concatStringsSep "\n" [
|
programs.zsh.initExtra = ''
|
||||||
(mkIf (cfg.settings != { }) ''
|
${optionalString (cfg.settings != { }) ''
|
||||||
eval "$(sheldon source)"
|
eval "$(sheldon source)"
|
||||||
'')
|
''}
|
||||||
(mkIf cfg.enableZshCompletions ''
|
${optionalString cfg.enableZshCompletions ''
|
||||||
if [[ $TERM != "dumb" ]]; then
|
if [[ $TERM != "dumb" ]]; then
|
||||||
eval "$(${cmd} completions --shell=zsh)"
|
eval "$(${sheldonCmd} completions --shell=zsh)"
|
||||||
fi
|
fi
|
||||||
'')
|
''}
|
||||||
];
|
'';
|
||||||
|
|
||||||
programs.fish.interactiveShellInit = builtins.concatStringsSep "\n" [
|
programs.fish.interactiveShellInit = ''
|
||||||
(mkIf (cfg.settings != { }) ''
|
${optionalString (cfg.settings != { }) ''
|
||||||
eval "$(sheldon source)"
|
eval "$(sheldon source)"
|
||||||
'')
|
''}
|
||||||
(mkIf cfg.enableFishCompletions ''
|
${optionalString cfg.enableFishCompletions ''
|
||||||
if test "$TERM" != "dumb"
|
if test "$TERM" != "dumb"
|
||||||
eval "$(${cmd} completions --shell=fish)"
|
eval "$(${sheldonCmd} completions --shell=fish)"
|
||||||
end
|
end
|
||||||
'')
|
''}
|
||||||
];
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue