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

cgproxy, nixos/cgproxy: init at 0.20 #273492

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

oluceps
Copy link
Member

@oluceps oluceps commented Dec 11, 2023

Description of changes

Add https://github.com/springzfx/cgproxy

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Dec 11, 2023
@oluceps oluceps changed the title cgproxy: init at 0.20 cgproxy, nixos/cgproxy: init at 0.20 Dec 11, 2023
@oluceps oluceps requested a review from NickCao December 11, 2023 08:33
@oluceps oluceps added 8.has: package (new) This PR adds a new package 8.has: module (new) This PR adds a module in `nixos/` labels Dec 11, 2023
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Dec 11, 2023
pkgs/by-name/cg/cgproxy/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/cg/cgproxy/package.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/cgproxy.nix Show resolved Hide resolved
nixos/modules/services/networking/cgproxy.nix Show resolved Hide resolved
enable_ipv6 = enable_ipv4 > enable_dns > enable_tcp = enable_udp
command cgproxy and cgnoproxy always have highest priority

Note: cgroup in configuration need to be exist, otherwise ignored
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we assert this?

Copy link
Member Author

@oluceps oluceps Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we assert this?

Nope, this is from upstream README and seems related to the cgroup at runtime, nix cannot handle this. I think this note may be unnecessary.

nixos/modules/services/networking/cgproxy.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/cgproxy.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/cgproxy.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/cgproxy.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/cgproxy.nix Outdated Show resolved Hide resolved
oluceps and others added 3 commits December 11, 2023 18:42
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
@@ -0,0 +1,110 @@
{ config, lib, pkgs, ... }:

with lib;
Copy link
Member

@fsnkty fsnkty Feb 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to address #208242 for this module, uses of with such as this should be avoided.
consider inherits where you find yourself using lib.foo excessively.


options = {
services.cgproxy = {
enable = mkEnableOption (lib.mdDoc "cgproxy");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib.mdDoc is now just an alias and can be safely removed everywhere.
see d36f950 and #237557

@oluceps
Copy link
Member Author

oluceps commented Mar 12, 2024

There may be some env issues in scripts. Mark as a draft until I have time to handle this. https://github.com/springzfx/cgproxy/blob/master/cgroup-tproxy.sh

@oluceps oluceps marked this pull request as draft March 12, 2024 07:46
@oluceps
Copy link
Member Author

oluceps commented Mar 12, 2024

Link #287770

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants