From 0d727d7074a1f065ada7d26268953449b55fbe9c Mon Sep 17 00:00:00 2001 From: Gregory Bednov Date: Wed, 2 Sep 2026 21:25:47 +0300 Subject: [PATCH] making stm32cube repo installed by default --- configuration.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 = [