Refactor networking configuration:
- Move settings to a separate file - Define PVE hosts to make suse the DNS stops fucking up the SSHFS mounts
This commit is contained in:
parent
7de8c811a2
commit
2c7366b601
2 changed files with 29 additions and 12 deletions
|
@ -13,25 +13,14 @@ in
|
|||
{
|
||||
imports = lib.flatten [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
(lib.custom.scanPaths ./.)
|
||||
|
||||
(map lib.custom.relativeToRoot [
|
||||
"modules/common"
|
||||
"hosts/common/core/fonts.nix"
|
||||
"hosts/common/core/ssh.nix"
|
||||
"hosts/users"
|
||||
])
|
||||
];
|
||||
|
||||
## NETWORKING ##
|
||||
networking = {
|
||||
dhcpcd.enable = false;
|
||||
hostName = hostSpec.hostName;
|
||||
networkmanager.enable = true;
|
||||
useDHCP = lib.mkDefault true;
|
||||
useHostResolvConf = false;
|
||||
usePredictableInterfaceNames = true;
|
||||
};
|
||||
|
||||
# System-wide packages, in case we log in as root
|
||||
environment.systemPackages = with pkgs; [
|
||||
micro
|
||||
|
|
28
hosts/common/core/networking.nix
Normal file
28
hosts/common/core/networking.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
## NETWORKING ##
|
||||
networking = {
|
||||
dhcpcd.enable = false;
|
||||
hostName = config.hostSpec.hostName;
|
||||
networkmanager.enable = true;
|
||||
useDHCP = lib.mkDefault true;
|
||||
useHostResolvConf = false;
|
||||
usePredictableInterfaceNames = true;
|
||||
|
||||
hosts = {
|
||||
"104.40.3.1" = [ "opn" ];
|
||||
"104.40.3.3" = [ "pve" ];
|
||||
"104.40.3.24" = [ "cloud" ];
|
||||
"104.40.3.34" = [ "proxy" ];
|
||||
"104.40.3.44" = [ "komodo" ];
|
||||
"104.40.3.54" = [ "nix" ];
|
||||
"104.40.4.1" = [ "opn" ];
|
||||
"104.40.4.7" = [ "rune" ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue