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