mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-22 08:04:20 +01:00
Add service to deploy home-assistant pyscript scripts
Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
parent
b7d82b950c
commit
d925c68f58
|
@ -109,6 +109,20 @@ in
|
||||||
|
|
||||||
system.stateVersion = "21.05";
|
system.stateVersion = "21.05";
|
||||||
|
|
||||||
|
systemd.services.home-assistant-pyscript = {
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
restartIfChanged = true;
|
||||||
|
path = [ pkgs.rsync ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
mkdir -p /mnt/kyle/infrastructure/home-assistant/home-assistant/pyscript
|
||||||
|
rsync --chown 403:403 --chmod Du=rwx,Dgo=rx,Fu=rw,Fgo=r -arvc --delete ${secret.pyscript}/. /mnt/kyle/infrastructure/home-assistant/home-assistant/pyscript/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
boot.kernel.sysctl."fs.inotify.max_user_instances" = 256;
|
boot.kernel.sysctl."fs.inotify.max_user_instances" = 256;
|
||||||
services.udev.extraRules =
|
services.udev.extraRules =
|
||||||
let
|
let
|
||||||
|
|
Loading…
Reference in a new issue