Revamp network config #77
No reviewers
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Fachschaft/nixConfig!77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nerf/nixConfig:networking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Given the time of day, I would be surprised if this works out without a request for changes.
I didn't touched bragi here, that one is special, even though bragi could assemble its config by
a very similar logic from
nixos/roles/hostmap.nix. This is a small push towards [#33]I would now assume that
nixos/modules/vmNetwork.nixonly gets imported bynixos/roles/vm.nixand notnixos/${machine}/configuration.nix.@ -0,0 +16,4 @@"192.168.0.26" = ["toth"];"192.168.0.27" = ["ithaqua"];"192.168.0.28" = ["nyarlathotep"];"192.168.0.29" = ["nixos-installer"];This vm does not exist anymore and I deleted its record on azathoth now.
@ -0,0 +18,4 @@"192.168.0.28" = ["nyarlathotep"];"192.168.0.29" = ["nixos-installer"];"192.168.0.30" = ["cthugha"];"192.168.0.40" = ["nerf-nixos-testlab"];This vm does not exist anymore and I deleted its record on azathoth now.
@ -0,0 +1,30 @@# This module assumes that every hostName of a machine in this repo only appears in one of the ip addresses,Will this assumption fail with IPv6?
Can we perhaps instead manage a record containing records of per-vm network config? Then we could extract and complete this towards it network config and generate the hostfile via some function.
I imagine some structure like
I did not spend a single thought about ipv6, I wanted to restructure the existing config not add new features.
In general we could do something similar this, I choose this way, because it directly corresponds to hostfiles.
What are we doing with hostfile entries that are not nix machines?
Right now we just specify exactly one ipv4 and let all the interface set up to
modules/vmNetworking.nix. This already assumes exactly one ipv4 address, and always configuresenX0. Adding support for a singular ipv6 address should be easy (and still feels out of scope to me). (But I see that extracting two different types of addresses out of this hostfile like syntax would be annoying).Do we want support for different interfaces and multiple addresses per nix machine? If we don't need it, it
will only make the config more repetitive.
So if we want to turn the structure around i would propose something like
which is less flexible, but also comes with less overhead that we might not need.
Fair. I mentioned it because introducing it might make all the effort spent here obsolete and thus polishing a non-compatible solution might be a waste of time. Otherwise, we don't need to include it now.
Since we may have dependencies on non-nix vms (e.g.
sanctamariamaterdei), I prefer to include them perhaps the way you currently do with all vms.I don't see where we need multiple interfaces, but IPv6 usually has multiple addresses per interface (global, link-local, ?).
👍
shouldn't we get all the non global ipv6 stuff from SLAAC?
And if not we could still do
@ -0,0 +2,4 @@# to derive the ip adress based on the hostname this will need patching if we will ever have a vm with multiple# outward facing network interfaces.# (other hostnames can appear multiple times){I don't see why this is a role and not part of the
vmNetworkmodule.I does not eat config options. This distinction is kind of weird and we inherited it from maralorn to have some starting point. It felt to me like it is more part of having the vm role, (this is also why it is hooked via
roles/vm.nix), than being an alone standing module. But I don't have hard feelings about that.I also thought about integrating
modules/vmNetwork.nixinto this role (as the argument is now superfluous).I don't really have an opinion either.
c78fca0751toa8bab398cea8bab398cetocfec4e9f32Revamp network configto WIP: Revamp network configcfec4e9f32toe9375ad338WIP: Revamp network configto Revamp network confige9375ad338tod5302456bbd5302456bbtof815391cbcf815391cbcto55fa0f193a55fa0f193atoe42e9f0ff7e42e9f0ff7toadb8640f6d@ -0,0 +50,4 @@};cthugha = {ipv4 = "192.168.0.30";};192.168.0.92 sanctamariamaterdeiis missingadb8640f6dtoec77890814@ -118,3 +118,3 @@BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK = "yes";};repo = "borg@192.168.1.11:lobon"; # TODO for https://gitea.mathebau.de/Fachschaft/nixConfig/issues/33repo = "borg@bragi:lobon"; # TODO for https://gitea.mathebau.de/Fachschaft/nixConfig/issues/33should the repo name
lobonbe hardcoded?Probably not.
Feels out of scope, I just noted as i changed the ip to a hostname
@ -359,3 +359,3 @@BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK = "yes";};repo = "borg@192.168.1.11:nyarlathotep"; # TODO for https://gitea.mathebau.de/Fachschaft/nixConfig/issues/33repo = "borg@bragi:nyarlathotep"; # TODO for https://gitea.mathebau.de/Fachschaft/nixConfig/issues/33should the repo name
nyarlathotepbe hardcoded?