hosts: enable networking module per host

a bunch of other shit too
This commit is contained in:
notohh 2023-11-29 23:04:57 -05:00
parent 4ba5d3baa3
commit c132571fe5
Signed by: notohh
GPG key ID: BD47506D475EE86D
20 changed files with 144 additions and 27 deletions

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./services ./services
./networking.nix
../../modules ../../modules
../../modules/fonts.nix ../../modules/fonts.nix
]; ];

View file

@ -3,7 +3,6 @@
../../home ../../home
../../home/wezterm ../../home/wezterm
../../home/zathura ../../home/zathura
../../home/lf
../../home/zellij ../../home/zellij
../../home/mako ../../home/mako
../../home/gtk/catppuccin-red.nix ../../home/gtk/catppuccin-red.nix

17
hosts/ame/networking.nix Normal file
View file

@ -0,0 +1,17 @@
_: {
networking = {
networkmanager.enable = true;
nameservers = ["192.168.1.221"];
firewall = {
enable = true;
};
};
environment.etc = {
"resolv.conf".text = ''
nameserver 192.168.1.221
nameserver 192.168.1.153
'';
};
services.tailscale.enable = true;
}

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./services ./services
./networking.nix
../../modules ../../modules
../../modules/prometheus/exporters/postgres.nix ../../modules/prometheus/exporters/postgres.nix
]; ];

View file

@ -0,0 +1,17 @@
_: {
networking = {
networkmanager.enable = true;
nameservers = ["192.168.1.221"];
firewall = {
enable = true;
};
};
environment.etc = {
"resolv.conf".text = ''
nameserver 192.168.1.221
nameserver 192.168.1.153
'';
};
services.tailscale.enable = true;
}

View file

@ -41,7 +41,7 @@ inputs: {
magicRollback = true; magicRollback = true;
}; };
sora = { sora = {
hostname = "100.87.54.48"; hostname = "100.104.42.96";
profiles.system = { profiles.system = {
user = "root"; user = "root";
path = activate.nixos inputs.self.nixosConfigurations.sora; path = activate.nixos inputs.self.nixosConfigurations.sora;

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./services ./services
./networking.nix
../../modules ../../modules
]; ];

View file

@ -0,0 +1,17 @@
_: {
networking = {
networkmanager.enable = true;
nameservers = ["192.168.1.221"];
firewall = {
enable = true;
};
};
environment.etc = {
"resolv.conf".text = ''
nameserver 192.168.1.221
nameserver 192.168.1.153
'';
};
services.tailscale.enable = true;
}

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./services ./services
./networking.nix
../../modules ../../modules
]; ];

View file

@ -0,0 +1,17 @@
_: {
networking = {
networkmanager.enable = true;
nameservers = ["192.168.1.221"];
firewall = {
enable = true;
};
};
environment.etc = {
"resolv.conf".text = ''
nameserver 192.168.1.221
nameserver 192.168.1.153
'';
};
services.tailscale.enable = true;
}

View file

@ -52,7 +52,7 @@ _: {
{ {
name = "Prometheus-sora"; name = "Prometheus-sora";
type = "prometheus"; type = "prometheus";
url = "http://100.87.54.48:9090"; url = "http://100.104.42.96:9090";
orgId = 1; orgId = 1;
} }
]; ];

View file

@ -1,6 +1,14 @@
{modulesPath, ...}: { {modulesPath, ...}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")]; imports = [(modulesPath + "/profiles/qemu-guest.nix")];
boot.loader.grub.device = "/dev/sda"; boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/B793-1B2C";
fsType = "vfat";
};
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"]; boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
boot.initrd.kernelModules = ["nvme"]; boot.initrd.kernelModules = ["nvme"];
fileSystems."/" = { fileSystems."/" = {

View file

@ -1,14 +1,12 @@
{lib, ...}: { {lib, ...}: {
environment.etc = {
"resolv.conf".text = "nameserver 1.1.1.1\n";
};
networking = { networking = {
nameservers = [ nameservers = [
"1.1.1.1" "185.12.64.2"
"185.12.64.1"
]; ];
defaultGateway = "172.31.1.1"; defaultGateway = "172.31.1.1";
defaultGateway6 = { defaultGateway6 = {
address = "fe80::1"; address = "";
interface = "eth0"; interface = "eth0";
}; };
dhcpcd.enable = false; dhcpcd.enable = false;
@ -17,36 +15,21 @@
eth0 = { eth0 = {
ipv4.addresses = [ ipv4.addresses = [
{ {
address = "5.161.181.184"; address = "5.161.102.107";
prefixLength = 32; prefixLength = 32;
} }
]; ];
ipv6.addresses = [
{
address = "2a01:4ff:f0:337a::1";
prefixLength = 64;
}
{
address = "fe80::9400:2ff:fe4e:83c1";
prefixLength = 64;
}
];
ipv4.routes = [ ipv4.routes = [
{ {
address = "172.31.1.1"; address = "172.31.1.1";
prefixLength = 32; prefixLength = 32;
} }
]; ];
ipv6.routes = [
{
address = "fe80::1";
prefixLength = 128;
}
];
}; };
}; };
}; };
services.udev.extraRules = '' services.udev.extraRules = ''
ATTR{address}=="96:00:02:4e:83:c1", NAME="eth0" ATTR{address}=="96:00:02:c2:dc:83", NAME="eth0"
''; '';
} }

View file

@ -4,5 +4,6 @@
./uptimekuma.nix ./uptimekuma.nix
./gotify.nix ./gotify.nix
./tailscale.nix ./tailscale.nix
./neko.nix
]; ];
} }

View file

@ -9,6 +9,7 @@
inputs.nix-gaming.nixosModules.pipewireLowLatency inputs.nix-gaming.nixosModules.pipewireLowLatency
./hardware-configuration.nix ./hardware-configuration.nix
./services ./services
./networking.nix
../../home/wayland/hyprland/wayland.nix ../../home/wayland/hyprland/wayland.nix
../../modules ../../modules
../../modules/fonts.nix ../../modules/fonts.nix

View file

@ -0,0 +1,17 @@
_: {
networking = {
networkmanager.enable = true;
nameservers = ["192.168.1.221"];
firewall = {
enable = true;
};
};
environment.etc = {
"resolv.conf".text = ''
nameserver 192.168.1.221
nameserver 192.168.1.153
'';
};
services.tailscale.enable = true;
}

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./services ./services
./networking.nix
../../modules ../../modules
]; ];

View file

@ -0,0 +1,17 @@
_: {
networking = {
networkmanager.enable = true;
nameservers = ["192.168.1.221"];
firewall = {
enable = true;
};
};
environment.etc = {
"resolv.conf".text = ''
nameserver 192.168.1.221
nameserver 192.168.1.153
'';
};
services.tailscale.enable = true;
}

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./services ./services
./networking.nix
../../modules ../../modules
]; ];

17
hosts/yuki/networking.nix Normal file
View file

@ -0,0 +1,17 @@
_: {
networking = {
networkmanager.enable = true;
nameservers = ["192.168.1.221"];
firewall = {
enable = true;
};
};
environment.etc = {
"resolv.conf".text = ''
nameserver 192.168.1.221
nameserver 192.168.1.153
'';
};
services.tailscale.enable = true;
}