sheldon: add shell configs

This commit is contained in:
Kyure_A 2024-07-26 00:19:55 +09:00
parent 70800bed61
commit d7f0ae8970

View file

@ -5,6 +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";
in { in {
meta.maintainers = pkgs.sheldon.meta.maintainers; meta.maintainers = pkgs.sheldon.meta.maintainers;
@ -34,5 +35,13 @@ in {
xdg.configFile."sheldon/plugins.toml" = mkIf (cfg.settings != { }) { xdg.configFile."sheldon/plugins.toml" = mkIf (cfg.settings != { }) {
source = tomlFormat.generate "sheldon-config" cfg.settings; source = tomlFormat.generate "sheldon-config" cfg.settings;
}; };
programs.bash.initExtra = mkIf (cfg.settings != { }) ''
eval "$(sheldon source)"
'';
programs.zsh.initExtra = mkIf (cfg.settings != { }) ''
eval "$(sheldon source)"
'';
}; };
} }