2023-09-14 11:54:51 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2023-09-14 14:48:39 +02:00
|
|
|
users.users.yoda = {
|
2023-09-14 14:43:25 +02:00
|
|
|
packages = with pkgs; [
|
2023-09-27 12:06:14 +02:00
|
|
|
# TODO: Is git required for home-manager "builtins.fetchGit"
|
2023-09-14 14:48:39 +02:00
|
|
|
git
|
2023-09-14 14:43:25 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-09-29 13:32:37 +02:00
|
|
|
# Download BikeTripPlanner Git repository.
|
2023-09-14 11:54:51 +02:00
|
|
|
home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
|
|
|
|
home.file."readonly-git/BikeTripPlanner".source = (builtins.fetchGit {
|
|
|
|
url = "https://github.com/langbein-daniel/BikeTripPlanner";
|
|
|
|
#leaveDotGit = true;
|
|
|
|
});
|
|
|
|
};
|
2023-09-29 13:32:37 +02:00
|
|
|
|
|
|
|
# Start BikeTripPlanner during boot.
|
|
|
|
# To few the log, run
|
|
|
|
# journalctl -b -u BikeTripPlanner -f
|
|
|
|
#
|
|
|
|
systemd.services."BikeTripPlanner" = {
|
|
|
|
description = "Start BikeTripPlanner";
|
|
|
|
path = with pkgs; [
|
|
|
|
bash
|
|
|
|
docker
|
|
|
|
];
|
|
|
|
script = ''
|
|
|
|
docker compose -f /home/yoda/readonly-git/BikeTripPlanner/deployment/btp-only.yml up -d --wait
|
|
|
|
'';
|
|
|
|
# Start after login.
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
};
|
2023-09-14 11:54:51 +02:00
|
|
|
}
|