- Import nixosModule.
# flake.nix
{
inputs.daeuniverse.url = "github:daeuniverse/flake.nix";
# ...
outputs = {nixpkgs, ...} @ inputs: {
nixosConfigurations.HOSTNAME = nixpkgs.lib.nixosSystem {
modules = [
inputs.daeuniverse.nixosModules.dae
inputs.daeuniverse.nixosModules.daed
];
};
}
}
- Enable dae or daed module.
To see full options, check
dae{,d}/module.nix
.
# nixos configuration module
{
# ...
services.dae = {
enable = true;
openFirewall = {
enable = true;
port = 12345;
};
/* default options
package = inputs.daeuniverse.packages.x86_64-linux.dae; or dae-unstable etc.
disableTxChecksumIpGeneric = false;
configFile = "/etc/dae/config.dae";
assets = with pkgs; [ v2ray-geoip v2ray-domain-list-community ];
*/
# alternative of `assets`, a dir contains geo database.
# assetsPath = "/etc/dae";
};
}
# nixos configuration module
{
# daed - dae with a web dashboard
services.daed = {
enable = true;
openFirewall = {
enable = true;
port = 12345;
};
/* default options
package = inputs.daeuniverse.packages.x86_64-linux.daed;
configDir = "/etc/daed";
listen = "127.0.0.1:2023";
*/
};
}
This flake contains serval different revision of packages:
- dae (alias of dae-release)
- dae-release (current latest release version)
- dae-unstable (keep sync with dae
main
branch) - dae-experiment (specific pull request for untested features)
See details with nix flake show github:daeuniverse/flake.nix
# nixos configuration module
{
environment.systemPackages =
with inputs.daeuniverse.packages.x86_64-linux;
[ dae daed ]; # or dae-unstable dae-experient
}
-
Nightly Build: Use the
dae-unstable
package for early access to new features, always synced with the latest updates. For testing specific, unpublished changes, trydae-experiment
, pinned to feature branch commits. -
Release Build: Use the
dae
ordae-release
package for stable, production-ready version. History versions are available with tags (e.g.refs/tags/dae-v0.8.0
).
Warning
Note that newly introduced features can sometimes be buggy; use at your own risk. However, we still highly encourage you to check out our latest builds as it may help us further analyze features stability and resolve potential bugs accordingly.
The main.nu
script on top-level of this repo is able to help you update the package. See help message with ./main.nu
.
The cmd args looks like:
# usage
commands: [sync] <PROJECT> <VERSIONS...> --rev <REVISION>
About adding a new version, if the VERSIONS
you provided doesn't match any of ["release" "unstable"]
, it will:
- Check the
--rev
arg and read its value - Run
nix-prefetch-git
to get its info - Adding a new record to
metadata.json
- Update the vendorHash.
The --rev
args could pass in with:
- revision hash
- refs/heads/
- refs/tags/v0.0.0
Workflow for updating release and unstable:
./main.nu sync dae release unstable # or leave the last 2 args empty
workflow for updating single version:
./main.nu sync dae release # or unstable
workflow for adding a new version:
./main.nu sync dae sth-new --rev 'rev_hash' or refs/heads/<branch> or refs/tags/v0.0.0
# after this will produce a new package called dae-sth-new
We use garnix cache and provide both x86_64-linux
and aarch64-linux
build products.
To setup the garnix cache:
nix.settings = {
substituters = ["https://cache.garnix.io"];
trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
ISC © 2023-2024 @daeuniverse