neovim: fix exec format

This commit is contained in:
Tigor Hutasuhut 2024-06-17 17:28:32 +07:00
parent 0361e056f5
commit 0738bef0b3

View file

@ -3,7 +3,7 @@ let
cfg = config.profile.neovim; cfg = config.profile.neovim;
inherit (lib) mkIf; inherit (lib) mkIf;
repository = "git@github.com:tigorlazuardi/nvim.git"; repository = "git@github.com:tigorlazuardi/nvim.git";
nvimCloneDir = "${config.home.homeDirectory}/nvim"; nvimCloneDir = "${config.home.homeDirectory}/.config/nvim";
in in
{ {
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -23,13 +23,12 @@ in
host = "github.com"; host = "github.com";
sleep = "${pkgs.coreutils}/bin/sleep"; sleep = "${pkgs.coreutils}/bin/sleep";
script = pkgs.writeScriptBin "clone-nvim.sh" '' script = pkgs.writeScriptBin "clone-nvim.sh" ''
#${bash} #!${bash}
if [ -d "${nvimCloneDir}" ]; then if [ -d "${nvimCloneDir}" ]; then
exit 0; exit 0;
fi fi
until ${ping} -c 1 ${host}; do until ${ping} -c 1 ${host}; do
${sleep} 1; ${sleep} 1;
done done
@ -42,7 +41,7 @@ in
in in
{ {
Type = "simple"; Type = "simple";
ExecStart = path; ExecStart = "${bash} ${path}";
Restart = "on-failure"; Restart = "on-failure";
RemainAfterExit = "yes"; RemainAfterExit = "yes";
}; };
@ -51,11 +50,6 @@ in
}; };
}; };
xdg.configFile.nvim = {
source = config.lib.file.mkOutOfStoreSymlink nvimCloneDir;
recursive = true;
};
sops.secrets."copilot" = { sops.secrets."copilot" = {
path = "${config.home.homeDirectory}/.config/github-copilot/hosts.json"; path = "${config.home.homeDirectory}/.config/github-copilot/hosts.json";
}; };