Add template directory to package derivation output

This commit is contained in:
thiloho
2024-08-10 22:58:05 +02:00
parent 162118bb56
commit 8c76fba2ad
2 changed files with 12 additions and 0 deletions

View File

@@ -100,6 +100,7 @@ in
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
Restart = "always"; Restart = "always";
WorkingDirectory = "${cfg.package}/web-app";
}; };
script = '' script = ''

View File

@@ -32,12 +32,23 @@ let
cp -r db/migrations/* $out/rest-api/db/migrations cp -r db/migrations/* $out/rest-api/db/migrations
''; '';
}; };
templates = stdenv.mkDerivation {
inherit pname version;
name = "archtika-templates";
src = ../templates;
installPhase = ''
mkdir -p $out/templates
cp -r * $out/templates
'';
};
in in
symlinkJoin { symlinkJoin {
name = pname; name = pname;
paths = [ paths = [
web web
api api
templates
]; ];
meta = with lib; { meta = with lib; {