Compare commits
2 commits
91bafef163
...
c538cb8211
| Author | SHA1 | Date | |
|---|---|---|---|
| c538cb8211 | |||
| a3edfa91e9 |
2 changed files with 45 additions and 16 deletions
|
|
@ -4,27 +4,40 @@
|
|||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.starship;
|
||||
fish-cfg = config.youthlic.programs.fish;
|
||||
bash-cfg = config.youthlic.programs.bash;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.starship = {
|
||||
enable = lib.mkEnableOption "starship";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.starship = lib.mkMerge [
|
||||
{
|
||||
enable = true;
|
||||
settings = let
|
||||
config-file = builtins.readFile ./config.toml;
|
||||
in
|
||||
builtins.fromTOML config-file;
|
||||
config = lib.mkMerge [
|
||||
(
|
||||
lib.mkIf cfg.enable {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableTransience = true;
|
||||
settings = let
|
||||
config-file = builtins.readFile ./config.toml;
|
||||
in
|
||||
builtins.fromTOML config-file;
|
||||
};
|
||||
}
|
||||
(lib.mkIf config.youthlic.programs.fish.enable {
|
||||
enableFishIntegration = true;
|
||||
})
|
||||
(lib.mkIf config.youthlic.programs.bash.enable {
|
||||
enableBashIntegration = true;
|
||||
})
|
||||
];
|
||||
};
|
||||
)
|
||||
(lib.mkIf (cfg.enable && fish-cfg.enable) {
|
||||
programs.starship.enableFishIntegration = true;
|
||||
programs.fish.functions = {
|
||||
starship_transient_prompt_func = ''
|
||||
starship module character
|
||||
'';
|
||||
starship_transient_rprompt_func = ''
|
||||
starship module time
|
||||
'';
|
||||
};
|
||||
})
|
||||
(lib.mkIf (cfg.enable && bash-cfg.enable) {
|
||||
programs.starship.enableBashIntegration = true;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
16
templates/cxx/Makefile
Normal file
16
templates/cxx/Makefile
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
main.out: main.o
|
||||
$(CXX) -std=c++26 $^ -o $@
|
||||
|
||||
main.o: main.cxx
|
||||
$(CXX) -std=c++26 -c $^
|
||||
|
||||
compile_commands.json: clean
|
||||
bear -- make
|
||||
|
||||
.PHONY: run clean
|
||||
run: main
|
||||
@echo Run:
|
||||
@./main
|
||||
|
||||
clean:
|
||||
-rm main.out main.o
|
||||
Loading…
Add table
Add a link
Reference in a new issue