{ lib, config, ... }:
# Global default configuration and management of vikunja service
let
inherit (lib) mkDefault mkIf;
in mkIf config.services.vikunja.enable {
# Mandatory configuration to get vikunja to work
services.vikunja.frontendScheme = mkDefault "http";
services.vikunja.frontendHostname = mkDefault "localhost";
# FIXME(Krey): Figure out how to run this without nginx
services.nginx.enable = true;
services.vikunja.setupNginx = true;
environment.persistence."/nix/persist/service/vikunja" = {
hideMounts = true;
directories = [
"/var/lib/tor/onion/hiddenVikunja" # Tor Files
"/var/lib/private/vikunja"
];
# files = [
# # NOTE/FIXME(Krey): Do not use `config.services.vikunja.database.path` here bcs it saves a symlink in /var/lib/vikunja/vikunja.db that points to /var/lib/private/vikunja/vikunja.db
# # "/var/lib/private/vikunja/vikunja.db" # Database
# # "/etc/vikunja/config.yaml"
# ];
};
}
which makes hard dependency on impermanence modules which is unwanted as without the impermanence loaded it will error out with environment.persistance doesn't exists
Impermanence does have an enable option for each persistent path, set to true by default for each persistent path. There does not appear to be a "global" enable option like environment.persistence.enable.
I am trying to make independent modules in my nixos-config so that e.g.
But there isn't an easy way to do e.g.
So that it can be declared that: IF Lanzaboote is enabled AND impermenance is enabled THEN persist lanzaboote files
Same issues with other modules e.g. persisting vikunja's database, etc.. so that i have to make a huge declaration alike:
or
which makes hard dependency on impermanence modules which is unwanted as without the impermanence loaded it will error out with
environment.persistance
doesn't exists