nvim systemd for cloning
This commit is contained in:
@@ -1,9 +1,24 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
hj.files."./.config/nvim" = {
|
systemd.user.services."nvim-config" = {
|
||||||
source = builtins.fetchGit {
|
description = "Clone Neovim config into ~/.config/nvim";
|
||||||
url = "https://git.archfox.org/poslop/nvbad.git";
|
after = [ "network.target" ];
|
||||||
rev = "eab1653d4e3663562c597bab493eeb12d94d905c";
|
wantedBy = [ "default.target" ];
|
||||||
|
enable = true;
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
};
|
};
|
||||||
uid = "poslop";
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user