-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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: add support for Ubuntu Fan Networking #9188
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cstrahan
force-pushed
the
ubuntu-fan
branch
4 times, most recently
from
August 11, 2015 21:52
1cd193c
to
699df01
Compare
I've rebased this onto the latest master, and split the kernel patch into two versions, one for 3.x versions of the kernel (tested with 3.18), and one for 4.x versions (I had to resolve one minor conflict). |
Here's an example of how Fan networking can be used with Docker: { config, lib, pkgs, ... }:
{
# Enable the Fan:
networking.ubuntu-fan.enable = true;
# The ubuntu-fan service will load /etc/network/fan if it exists,
# so we can configure our fans here:
environment.etc."network/fan".text = ''
10.0.0.0/8 172.16.3.4/16 dhcp
'';
# Alternatively:
#networking.localCommands = ''
# ${pkgs.fanctl}/bin/fanctl up 10.0.0.0/8 172.16.3.4/16 dhcp
#'';
# Start docker, and use the Fan bridge:
virtualisation.docker.enable = true;
virtualisation.docker.extraOptions = "--bridge=fan-10-3-4 --mtu=1480 --iptables=false";
# Use the Fan Networking patches from Ubuntu:
nixpkgs.config.packageOverrides = super: let self = super.pkgs; in rec {
linux_3_18 = super.linux_3_18.override {
kernelPatches = super.linux_3_18.kernelPatches ++ [ self.kernelPatches.ubuntu_fan ];
};
}
} |
This provides support for Ubuntu Fan Networking [1]. This includes: * The fanctl package, and a corresponding NixOS service. * iproute patches. * kernel patches. closes NixOS#9188 1: https://wiki.ubuntu.com/FanNetworking
cstrahan
added a commit
to cstrahan/nixpkgs
that referenced
this pull request
Aug 13, 2015
This provides support for Ubuntu Fan Networking [1]. This includes: * The fanctl package, and a corresponding NixOS service. * iproute patches. * kernel patches. closes NixOS#9188 1: https://wiki.ubuntu.com/FanNetworking
I've tested this pretty thoroughly so I'm going to merge this in now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This provides patches (for iproute2 and the kernel) to support Ubuntu Fan Networking.
This is currently based off of the latest nixos-unstable channel; if you'd like to play around with this, it shouldn't require rebuilding too many packages.
A note about
ubuntu-fan-4.0.patch
andubuntu-fan-4.1.patch
: when this is ready to merge, I'll rebase onto master, remove the former and keep the latter. The master branch has iproute 4.1.1, which requires a slightly different patch than version 4.0.0.I'm currently patching
iproute
andlinux_3_18
unconditionally; that's only temporary while I'm testing things out.For reference: