fix(modules): use activationScript to copy homepage config

This commit is contained in:
Jo 2024-09-25 00:24:18 +02:00
parent ea850dfe76
commit f4544d402c

View file

@ -13,12 +13,16 @@ in {
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"d /var/lib/containers/homepage 0700 root root -"
"d /var/lib/containers/homepage/config 0700 root root -"
"d /var/lib/containers/homepage/images 0700 root root -"
"d /var/lib/containers/homepage 0700 root root - - - exec cp -r ${homepageConfigDirectory}/* /var/lib/containers/homepage"
];
system.activationScripts.homepage = ''
# Copy files from homepageConfigDirectory to the target directory
cp -r ${homepageConfigDirectory}/* /var/lib/containers/homepage/
'';
virtualisation.oci-containers.containers.homepage = {
image = "ghcr.io/gethomepage/homepage:latest";
autoStart = true;