From af38624f5949b99fd06280c11546c76380478e0d Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Thu, 19 Sep 2024 00:04:02 -0500 Subject: [PATCH] add an evil hack --- boxes/netbox/franklincce.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/boxes/netbox/franklincce.nix b/boxes/netbox/franklincce.nix index f5cf6cd..51f935d 100644 --- a/boxes/netbox/franklincce.nix +++ b/boxes/netbox/franklincce.nix @@ -9,4 +9,33 @@ proxyPass = "http://localhost:1337"; }; }; + + # WARNING WARNING WARNING + # the below is SUPER BAD and should not be copied ANYWHERE + # the docker container should be initialized by a flake or other nix concept, + # not this nonsense + + systemd.services.franklincce = { + description = "the docker container that runs the franklincce app"; + + environment = { # this is EVIL, NEVER DO THIS!!!111! + NIX_PATH = "nixpkgs=flake:nixpkgs:/nix/var/nix/profiles/per-user/root/channels"; + }; + + script = '' + cd /home/ryan + + # don't fail if cloning the git repo fails + ${pkgs.git}/bin/git clone https://git.beepboop.systems/stupidcomputer/yig yig || true + + cd /home/ryan/yig + ${pkgs.nix}/bin/nix-shell --command make + ''; + + serviceConfig = { + User = "ryan"; + }; + + wantedBy = [ "multi-user.target" ]; + }; }