nix-git/hosts/yodaYoga/host-specific.nix
2023-10-09 11:35:35 +02:00

35 lines
887 B
Nix

{ config, pkgs, ... }:
{
users.users.yoda = {
packages = with pkgs; [
# Is git required for home-manager "builtins.fetchGit"?
#git
];
};
# 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";
#leaveDotGit = 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" ];
};
}