Hi @zell - thanks for asking!
We definitely need to improve the documentation around this aspect of flox configuration, but rest assured that flox was born in an enterprise setting so we completely understand the need for it to be configurable at the package, machine, individual, and environment-specific levels.
The package level
The flox package is built with its own configuration defaults, and you can see those with the following command:
$ cat $(flox --bash-passthru --prefix)/etc/flox.toml
# Package-specific defaults here.
# Company-specific defaults in /etc/flox.toml.
# User-specific overrides in ~/.floxrc.
[floxpkgs]
gitBaseURL = "https://github.com/"
$ flox pull -e some-owner/some-environment
confirm git URL for storing profile metadata: https://github.com/some-owner/floxmeta
As you can see there is only one “package” level default, which is the gitBaseURL
parameter. We anticipate building custom versions of the flox installers for companies that would like versions with their configuration defaults “baked in”.
The machine level
Administrators can also impose system-wide defaults by way of the /etc/flox.toml
file. Values in this file will override the package defaults.
$ cat /etc/flox.toml
[floxpkgs]
gitBaseURL = "https://github.floxdev.com/"
$ flox pull -e some-owner/some-environment
confirm git URL for storing profile metadata: https://github.floxdev.com/some-owner/floxmeta
The individual level
Individuals can also configure their own personal default gitBaseURL
, and this value will override the one(s) provided as machine and package defaults. This is done by way of the flox config
command:
$ flox --bash-passthru config --set gitBaseURL https://github.mycompany.com/
channels = "{}"
educatePublish = "1"
floxClientUUID = "7cc96fb2-adeb-11ed-ae86-ffa1e0378296"
gitBaseURL = "https://github.mycompany.com/"
$ flox pull -e some-owner/some-environment
confirm git URL for storing profile metadata: https://github.mycompany.com/some-owner/floxmeta
The environment level
Finally, you’ll recall as you first flox push
or flox pull
an environment you are prompted to confirm the URL where flox expects to find the metadata, and you can override this default to point it wherever you like, e.g.:
$ flox pull -e some-owner/some-environment
confirm git URL for storing profile metadata: https://github.com/some-owner/floxmeta
In the above prompt, simply change the URL to be whatever you like. (The URL doesn’t even need to end in /floxmeta
, but we strongly recommend you use that as the repository name.) If the server you provide has the “github” string in it then flox will attempt to manage authentication and access for you by way of the gh
CLI, and if you provide some other valid git URL then you’ll need to create the repository and configure your own ssh keys / access.
We need you!
We recognize that this is an area where variations in corporate environments will present a never-ending stream of challenges, and that we have a lot of work ahead of us improving the user experience around the use of non-Github repositories. To really get this right we will need all the feedback we can get, so if you would like to work with us to configure flox for your environment please get in touch by signing up for the enterprise beta or emailing Robin at rtb@floxdev.com.
Again, many thanks for the feedback!