| 3 Feb 2026 |
Johnny | So I have defined flake for one of my nixos containers with a Git URL. I have the container configured to auto start. But that errors with the message that git cannot be found | 22:29:20 |
Johnny | Do I need to add Git to the PATH of the systemd job that starts the container somehow? | 22:29:59 |
Johnny | For reference:
containers.canteendle = {
autoStart = true;
flake = "git+https://example.com/test.git#container";
}
Results in
error: executing 'git': No such file or directory
error:
… while fetching the input 'git+https://example.com/test.git'
In the logs of the service that tries to start the container
| 22:39:00 |
eveeifyeve | Is this for a private git? | 22:40:11 |
Johnny | No | 22:40:18 |
Johnny | But it seems like it doesn't get far enough for that to matter anyway | 22:40:35 |
eveeifyeve | Second question is this a github? | 22:40:57 |
Johnny | it is not | 22:41:03 |
Johnny | It's a codeberg Repo, I guess there's no need to censor it flake = "git+https://codeberg.org/johnnyjayjay/canteendle.git#container" | 22:41:45 |
eveeifyeve | Try git+https://codeberg.org/johnnyjayjay/canteendle#container. | 22:44:12 |
Johnny | how's that gonna change anything about the fact that git isn't present | 22:44:33 |
eveeifyeve | It uses builtin fetchers. | 22:44:55 |
eveeifyeve | * It uses builtin fetchers, so git shouldn't be required. | 22:45:06 |
eveeifyeve | * It uses builtin fetchers, so git shouldn't be required, I think. | 22:45:23 |
Johnny | I don't really get it, but I'll try | 22:45:44 |
Johnny | Yeah, no difference | 22:46:18 |
eveeifyeve | What is your nix version? | 22:47:58 |
Johnny | Latest unstable currently | 22:48:08 |
eveeifyeve | Could you please provide me the log? | 22:51:26 |
eveeifyeve | * Could you please provide me the log, that you produce? | 22:51:37 |
eveeifyeve | Oh wait you did. | 22:52:38 |
eveeifyeve | Yeah you need git on the machine. | 22:52:51 |
eveeifyeve | add Git to system packages. | 22:53:13 |
Johnny | It is already installed, is the thing | 22:54:35 |
Johnny | I also tried adding it to the systemd service PATH directly, that didn't change anything either | 22:54:55 |
Johnny | Nevermind, I messed that part up before | 22:57:06 |
Johnny | I fixed it now
systemd.services."container@canteendle".path = [ pkgs.git ]; | 22:57:18 |
Johnny | I realise that my flake reference syntax is wrong. Is it possible to reference a flake nixosConfiguration output in a flake reference URL? | 23:01:38 |
lillecarl | nix build ./myflake#nixosConfigurations.hostname.config.system.build.toplevel or something, is that what you're refering to? | 23:20:11 |
eveeifyeve | In the container he means. | 23:20:55 |