25 lines
579 B
Nix
25 lines
579 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
systemd.user.services."nvim-config" = {
|
|
description = "Clone Neovim config into ~/.config/nvim";
|
|
after = [ "network.target" ];
|
|
wantedBy = [ "default.target" ];
|
|
enable = true;
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
};
|
|
|
|
script = ''
|
|
set -e
|
|
|
|
if [ ! -d "$HOME/.config/nvim/.git" ]; then
|
|
echo "Cloning Neovim config..."
|
|
${pkgs.git}/bin/git clone https://git.archfox.org/poslop/nvbad.git "$HOME/.config/nvim"
|
|
else
|
|
echo "Neovim config already exists, skipping."
|
|
fi
|
|
'';
|
|
};
|
|
}
|