NixOS¶
Riptide can be installed as a NixOS module. This is provided via a Flake in the riptide-all repository.
Installation¶
You can either install the module via a Flake or by manually pulling the
module with fetchTarball in a classic NixOS system configuration.
Via Flake¶
Change your flake.nix like so:
{
inputs.riptide.url = "github:theCapypara/riptide-all";
# optional:
#inputs.riptide.inputs.nixpkgs.follows = "nixpkgs";
# optionally choose not to download darwin deps (saves some resources on Linux)
#inputs.riptide.inputs.darwin.follows = "";
outputs = { self, nixpkgs, riptide }: {
# change `yourhostname` to your actual hostname
nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
# change to your system:
system = "x86_64-linux";
modules = [
./configuration.nix
riptide.nixosModules.default
];
};
};
}
Via fetchTarball¶
This is currently not supported. Please use Flakes or get in touch if you need this.
Enable Riptide¶
To enable and use Riptide, use the services.riptide configuration:
services.riptide = {
enable = true;
# Replace with your username. Must be managed by NixOS via `users.users`.
user = "YOUR USERNAME";
};
# Docker must also be enabled. Podman may also be used, but may not
# be fully compatible.
virtualisation = {
containers.enable = true;
oci-containers.backend = "docker";
docker.enable = true;
};
# Add yourself to the docker group.
users.users."YOUR USERNAME" = {
extraGroups = [
"docker"
];
};
See below for all options.
Shell integration¶
Riptide adds some additional features to your shell, in order to automatically add project
commands into your shell. To use this feature, asuming you use Flakes,
you can add hooks into your bashrc or zshrc via
riptide.riptideShellIntegration.bash or riptide.riptideShellIntegration.zsh.
Example for ZSH using home-manager:
{ riptide }:
{
programs.zsh = {
enable = true;
enableCompletion = true;
initExtra = ''
${riptide.riptideShellIntegration.zsh}
'';
};
}
If you can not use this or are not using Flakes add these to either your .zshrc or .bashrc:
.bashrc:
. <(nix-riptide.hook.bash).zshrc:
. <(nix-riptide.hook.zsh)
Please note that these could change with Riptide updates, so using the value provided by the Flake is recommended.
Module configuration¶
services.riptide.enable¶
Whether to enable Riptide general service and CLI.
Type: boolean
Default:
false
Example:
true
services.riptide.cli¶
CLI settings
Type: submodule
Default:
{ }
services.riptide.cli.package¶
The riptide-cli package to use. Defaults to the one provided by this Flake
Type: package
services.riptide.dbDrivers¶
Database driver settings
Type: submodule
Default:
{ }
services.riptide.dbDrivers.mongodb¶
Riptide MongoDB database driver
Type: submodule
Default:
{ }
services.riptide.dbDrivers.mongodb.enable¶
Whether to enable this package.
Type: boolean
Default:
false
Example:
true
services.riptide.dbDrivers.mongodb.package¶
The riptide-db-mongo package to use. Defaults to the one provided by this Flake
Type: package
services.riptide.dbDrivers.mysql¶
Riptide MySQL database driver
Type: submodule
Default:
{ }
services.riptide.dbDrivers.mysql.enable¶
Whether to enable this package.
Type: boolean
Default:
true
Example:
true
services.riptide.dbDrivers.mysql.package¶
The riptide-db-mysql package to use. Defaults to the one provided by this Flake
Type: package
services.riptide.dockerHost¶
Override the docker/podman socket Riptide connects to. Only relevant if
engine.name = "docker". Tries to auto-detect by default.
Type: string
Default:
""
Example:
"unix:///run/user/1000/podman/podman.sock"
services.riptide.engine¶
Settings regarding Riptide’s backend engine
Type: submodule
Default:
{ }
services.riptide.engine.package¶
The Riptide Engine package to use. Defaults to riptide-engine-docker provided by this Flake
Type: package
services.riptide.engine.name¶
Riptide engine implementation to use
Type: string
Default:
"docker"
services.riptide.extraConfig¶
Additional configuration to merge into the system configuration
Type: open submodule of (JSON value)
Default:
{ }
services.riptide.plugins¶
Plugin settings
Type: submodule
Default:
{ }
services.riptide.plugins.phpXdebug¶
Riptide Plugin to manage the state of PHP Xdebug
Type: submodule
Default:
{ }
services.riptide.plugins.phpXdebug.enable¶
Whether to enable this package.
Type: boolean
Default:
true
Example:
true
services.riptide.plugins.phpXdebug.package¶
The riptide-plugin-php-xdebug package to use. Defaults to the one provided by this Flake
Type: package
services.riptide.proxy¶
Settings regarding Riptide’s proxy server
Type: submodule
Default:
{ }
services.riptide.proxy.enable¶
Whether to enable Riptide Proxy Server.
Type: boolean
Default:
true
Example:
true
services.riptide.proxy.package¶
The riptide-proxy package to use. Defaults to the one provided by this Flake
Type: package
services.riptide.proxy.autostart¶
Enable or disable auto-starting when a project or service is not running
Type: boolean
Default:
true
services.riptide.proxy.ports¶
Proxy Server port configuration
Type: submodule
Default:
{ }
services.riptide.proxy.ports.http¶
The HTTP port the proxy server should bind to
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
80
Example:
80
services.riptide.proxy.ports.https¶
The HTTPS port the proxy server should bind to
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
443
Example:
443
services.riptide.proxy.url¶
The prefix that you want your projects to be accessible under. riptide.local -> projectname.riptide.local
Type: string
Default:
"riptide.local"
Example:
"riptide.local"
services.riptide.python¶
What Python environment to use. Change this only if you know what you are doing
Type: package
services.riptide.repos¶
List of Riptide repositories. By default this contains the public community repository
Type: list of string
Default:
[
"https://github.com/theCapypara/riptide-repo.git"
]
Example:
[
"https://github.com/theCapypara/riptide-repo.git"
"https://github.com/foobar/repo.git"
]
services.riptide.resolveProjectHosts¶
If enabled, project URLs are locally resolvable. Under NixOS this will install the dnsmasq service, if not already installed. Under nix-darwin, the /etc/hosts file will be modified by Riptide.
Type: boolean
Default:
true
services.riptide.user¶
The user to run the Riptide proxy as (if enabled) and the user for which the configuration file will be created.
Type: string
Example:
"yourUser"