-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
nixos/hans: init #36734
nixos/hans: init #36734
Conversation
uid = config.ids.uids.hans; | ||
description = "Hans daemon user"; | ||
}; | ||
users.extraGroups.hans.gid = config.ids.gids.hans; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed uid/gids should not be required since hans has no persistent files.
@Mic92 Fixed, thank you! |
EOF | ||
chmod 700 /run/iodined/script | ||
''; | ||
script = "/run/iodined/script"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can put the same script here as a string, you wrote into /run/iodined/script
without any need for shebangs.
EOF | ||
chmod 700 /run/iodine/${name}-script | ||
''; | ||
script = "/run/iodine/${name}-script"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
EOF | ||
chmod 700 /run/hans/script | ||
''; | ||
script = "/run/hans/script"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
#!/bin/sh | ||
${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.extraConfig} -c ${cfg.server} ${optionalString (cfg.passwordFile != "") "-p $(cat \"${cfg.passwordFile}\")"} | ||
EOF | ||
chmod 700 /run/hans/${name}-script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@Mic92 Thanks! |
type = types.bool; | ||
default = false; | ||
description = "Respond to ordinary pings"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this option belongs in this module. We also have networking.firewall.allowPing
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fpletz Renamed. This is pure hans option https://github.com/albertzak/hanstunnel#cant-connect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. You're right. 👍
@matthewbauer Thank you! |
Motivation for this change
Add module for Hans IP over ICMP tunnel. Mostly copypaste of iodine module.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)