nix-git/hosts/yodaYoga/BikeTripPlanner.nix
2025-02-02 11:23:50 +01:00

40 lines
1.0 KiB
Nix

{ config, pkgs, ... }:
{
imports = [
../../modules/headless.nix
../../modules/ssh-fde-unlock.nix
../../modules/ssh-server.nix
../../modules/docker.nix
../../modules/lid-switch-handling.nix
../../modules/sendmail-mta.nix
../../modules/journalwatch.nix
];
# Download BikeTripPlanner Git repository.
home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
home.file."readonly-git/BikeTripPlanner".source = (builtins.fetchGit {
url = "https://github.com/langbein-daniel/BikeTripPlanner";
#rev = "6d4daf18235189825b0c314901b1617ece6d8641";
#submodules = true;
});
};
# Start BikeTripPlanner during boot.
# To few the log, run
# journalctl -b -u BikeTripPlanner -f
#
systemd.services."BikeTripPlanner" = {
description = "Start BikeTripPlanner";
path = with pkgs; [
docker
];
script = ''
docker compose -f /home/yoda/readonly-git/BikeTripPlanner/deployment/btp-only.yml up -d --wait
'';
# Start after login.
wantedBy = [ "multi-user.target" ];
};
}