diff --git a/configuration.nix b/configuration.nix index 9d84160..b0e8ab8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -676,6 +676,25 @@ in PGUSER = "postgres"; }; }; + + + + systemd.user.services.stm32cubemx-repo = + let + stm32f1-v180 = builtins.fetchTarball { url = "http://${serverIP}/STM32Cube.tar.gz"; sha256 = "sha256:1zlcp82xq16anx02ghiv9xa5bi2fsz78h945miqmi26bwcjxdagn"; }; + + in { + description = "STM32CubeMX firmware repository setup"; + wantedBy = [ "default.target" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = pkgs.writeShellScript "stm32cubemx-repo-setup" '' + cp -r ${stm32f1-v180}/. "$HOME/STM32Cube" + chmod -R u+w "$HOME/STM32Cube" + ''; + }; + }; services.grdcontrol.enable = true; imports = [