gytis-ivaskevicius / flake-utils-plus

Use Nix flakes without any fluff.
MIT License
494 stars 54 forks source link

config generators (generalized) #10

Closed blaggacao closed 3 years ago

blaggacao commented 3 years ago

currently, nixosConfigurationsGenerator are implemented, however a typical flake based nixos or — generalized — nix controlled environment (machines, phones, iot, routers, etc), further generators are in order.

I suggest the canonical way to implement additional generators is through accessing self:

{
  outputs = inputs@{ self, nixpkgs, unstable, nur, utils, home-manager, neovim }:
    utils.lib.systemFlake { "..." = "..."; }
    // { 
        hmConfigurations = hmConfigigurationsGenerator self.nixosConfigurations;
        deploy.nodes = deployConfigurationsGenerator deploy self.nixosConfigurations;
    };
}

Or do we need an optional lib of generators to support well-known upstream projects? Since it's not called flake-utils-nixos, maybe there is a good argument to make about this.

/cc @Pacman99

blaggacao commented 3 years ago

Closed by #17