Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add package metainfo #17

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
$ nix build github:daeuniverse/flake.nix#packages.x86_64-linux.dae
```

## use with flake
## Use with flake

Modify flake.nix
1. Import nixosModule.

```nix
# flake.nix
Expand All @@ -28,40 +28,50 @@ Modify flake.nix
};
}
}
```


# configuration.nix
2. Enable dae or daed module.

{inputs, pkgs, ...}: {
```nix
# configuration.nix

# to see full options, check dae{,d}/module.nix

# with daed
services.daed = {
# with dae
services.dae = {
enable = true;
configDir = "/etc/daed";
listen = "0.0.0.0:2023";
package = pkgs.dae;
disableTxChecksumIpGeneric = false;
configFile = "/etc/dae/config.dae";
assets = with pkgs; [ v2ray-geoip v2ray-domain-list-community ];
openFirewall = {
enable = true;
port = 12345;
};
};
```

# or with dae
services.dae = {

```nix
# with daed
services.daed = {
enable = true;
disableTxChecksumIpGeneric = false;
configFile = "/etc/dae/config.dae";
assets = with pkgs; [ v2ray-geoip v2ray-domain-list-community ];
openFirewall = {
package = pkgs.daed;
configdir = "/etc/daed";
listen = "0.0.0.0:2023";
openfirewall = {
enable = true;
port = 12345;
};
};
};

# use packages
```

## Directly use packages

```nix

#...
environment.systemPackages =
with inputs.daeuniverse.packages.x86_64-linux;
[ dae daed ];
Expand Down
11 changes: 10 additions & 1 deletion dae/package.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ clang
{ lib
, clang
, fetchFromGitHub
, buildGoModule
}:
Expand Down Expand Up @@ -41,4 +42,12 @@ buildGoModule rec {
substituteInPlace $out/lib/systemd/system/dae.service \
--replace /usr/bin/dae $out/bin/dae
'';

meta = with lib; {
description = "A Linux high-performance transparent proxy solution based on eBPF";
homepage = "https://github.com/daeuniverse/dae";
license = licenses.agpl3Only;
platforms = platforms.linux;
mainProgram = "dae";
};
}
Loading