fix startup failing when run via nixos module
1 file changed, 1 insertion(+), 5 deletions(-)
changed files
M flake.nix → flake.nix
@@ -120,9 +120,6 @@ mycal = { config, lib, pkgs, ... }: let cfg = config.services.mycal; - pkg = cfg.venv; - python = self.packages.${pkgs.system}.python; - settingsFormat = pkgs.formats.toml { }; inherit (lib) mkEnableOption mkOption mkIf types;@@ -215,13 +212,12 @@ systemd.services.mycal = { description = "Mycal Calendar Service"; environment = { - PYTHONPATH = "${python.pkgs.makePythonPath pkg.propagatedBuildInputs}:${pkg}/${python.sitePackages}"; CONFIG_FILE = settingsFormat.generate "mycal-config.toml" cfg.settings; }; serviceConfig = { ExecStart = '' - ${lib.getExe python.pkgs.gunicorn} \ + ${cfg.venv}/bin/gunicorn \ --bind ${cfg.host}:${toString cfg.port} \ --workers 1 \ mycal:app