Correctly package templates

This commit is contained in:
traxys 2023-10-13 20:43:53 +02:00
parent 6a34258a30
commit 6277631144
2 changed files with 9 additions and 1 deletions

View file

@ -29,7 +29,14 @@
RUST_DOC_PATH = "${rust}/share/doc/rust/html/std/index.html";
};
packages.default = naersk'.buildPackage ./.;
packages.default = naersk'.buildPackage {
src = ./.;
postInstall = ''
mkdir -p $out/share
cp -r templates $out/share
'';
};
})
// {nixosModules.stalwart-accounts = import ./nixos self;};
}

View file

@ -92,6 +92,7 @@ with lib; {
User = cfg.user;
ExecStart = "${cfg.package}/bin/stalwart-accounts";
EnvironmentFile = optional (cfg.environmentFile != null) cfg.environmentFile;
WorkingDirectory = "${cfg.package}/share";
# Security
NoNewPrivileges = true;
# Sandboxing