| 9 Feb 2024 |
pgibson | And not sure what happens if image = doesn't match - maybe it will run a separate image pulled from docker hub instead | 02:56:07 |
treed | Do oci images have a notion of a name internally? | 03:00:09 |
treed | oh yes you're right | 03:00:30 |
treed |
The `image` attribute must match the name and
tag of the image contained in this file, as they will be used to
run the container with that image. If they do not match, the
image will be pulled from the registry as usual.
| 03:00:37 |
treed | uhhh not sure what happened there | 03:00:43 |
pgibson | If you prefix the image name with localhost it will prevent it from downloading a new image, eg image = "localhost/hello-world"; fails rather than downloading the hello-world docker hub image | 03:12:48 |
pgibson | So that seems like a good measure | 03:13:51 |
pgibson | I've got a problem with colmena build caching the old version of the flake that builds the dockerImage after making changes to it | 03:32:49 |
pgibson | Is this due to the flake.lock? | 03:33:34 |
pgibson | If I delete the lock file then it picks up the changes | 03:40:41 |
pgibson | Is there something like --upgrade? | 03:40:48 |
pgibson | Is this the correct way to import a flake from a subdir? ``` inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; dockerSshTunnel.url = "path:./docker-ssh-tunnel"; };
| 03:44:30 |
pgibson | * Is this the correct way to import a flake from a subdir?
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
dockerSshTunnel.url = "path:./docker-ssh-tunnel";
};
| 03:44:43 |
pgibson | Or should I be using imports = [...] | 03:51:11 |
treed | If you want to update an input, it's nix flake lock --update-input $input-name | 23:24:22 |
treed | That'll update to the latest version | 23:24:32 |
treed | And I have no experience with local flakes, other than knowing that . is a reference to the local flake. So maybe just ./docker-ssh-tunnel | 23:25:18 |
treed | Although if it's working with the path prefix, then that's probably also fine | 23:25:30 |
treed | * And I have no experience with local flakes, other than knowing that . is a reference to the local directory's flake. So maybe just ./docker-ssh-tunnel | 23:28:22 |
treed | * And I have no experience with local flakes, other than knowing that . is a reference to the current directory's flake. So maybe just ./docker-ssh-tunnel | 23:28:30 |
pgibson | Appears to use the name that you import it under in your outer flake inputs | 23:28:35 |
treed | yeah, the name should be as listed in the inputs so dockerSshTunnel in your case | 23:29:03 |
pgibson | Steep learning curve, but being able to define a server with containers running as a service in a hundred LoC is pretty awesome | 23:31:23 |
treed | Yeah, my homelab has like 25 VMs and it's all from just over 5k LoC | 23:35:43 |
treed | I've done cfengine, puppet, chef, saltstack, ansible. This is by far the smoothest experience, once you figure out what you're doing | 23:36:04 |
treed | I still have to use ansible for the hypervisors (proxmox) and I get agitated every time | 23:36:24 |
pgibson | Ansible is just so unreasonably slow | 23:36:47 |
pgibson | Drives me crazy | 23:36:55 |
treed | Execution slowness doesn't really bother me. Just writing the stuff is so slow | 23:37:13 |
treed | All the stuff spread out in multiple files for even the simplest of "deploy this binary, run it as a service" things | 23:37:35 |