This commit is contained in:
Osman Faruk Bayram 2025-07-31 18:27:45 +03:00
parent 7603dfccb4
commit 63129b076f

View file

@ -19,7 +19,9 @@ let
]; ];
text = '' text = ''
#!/usr/bin/env bash #!/usr/bin/env bash
exec streamlit run /path/to/your/wanikani_stats_app.py echo "Starting WaniKani Stats Streamlit app..."
cat ${./app.py}
exec streamlit run ${./app.py} --server.port ${toString config.services.wanikani-stats.port}
''; '';
}; };
in in
@ -35,6 +37,12 @@ in
default = "/var/lib/wanikani-logs"; default = "/var/lib/wanikani-logs";
description = "Directory to get the log archives"; description = "Directory to get the log archives";
}; };
port = lib.mkOption {
type = lib.types.port;
default = 8501;
description = "Port for the WaniKani Stats service";
};
}; };
config = lib.mkIf config.services.wanikani-stats.enable { config = lib.mkIf config.services.wanikani-stats.enable {