Open jkarni opened 1 year ago
I'd love this feature, I use a git repo for my NixOS/home-manager configurations and other dotfiles but I've had trouble using garnix because the root directory is $HOME
and my flake is in a subdir:
~ $ tree
.bashrc
.config
├── nix-config
│ ├── flake.nix
│ ├── flake.lock
│ ├── overlays.nix
│ ├── home-modules
│ ├── hosts
│ ├── nixos-modules
│ └── pkgs
│ ... (more dotfiles tracked by git)
Downloads
...
While I'd prefer to leave the flake.nix
where it is, I did try putting it in $HOME
where garnix would find it. Unfortunately that causes nix to try to copy my entire home dir into the store every time I build the flake locally, which is unacceptable when I've got large files laying around.
I think my best shot for using garnix with this setup would be to separate the nix flake into another repo and use it as a submodule, but being able to specify a subdir for the flake in garnix.yaml
is definitely a preferable solution.
Maybe not in scope here, but I would like to be able to run jobs against multiple flake.nix files, e.g., as shown in https://github.com/NixOS/nix/issues/4193#issuecomment-1228967251.
The idea being that each flake would use a different release of nixpkgs, to ensure compatibility without having to maintain separate branches like Home Manager does.
Right now I have multiple nixpkgs inputs in the primary flake so the flake checks can be run against each of them. But that's a lot of overhead for a user who only wants to use the flake and doesn't care about the releases they aren’t using.
See
Presumably there'd be something like a
directory
option ingarnix.yaml
.