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 = [
./hardware-configuration.nix
./services
./networking.nix
../../modules
../../modules/fonts.nix
];

View file

@ -3,7 +3,6 @@
../../home
../../home/wezterm
../../home/zathura
../../home/lf
../../home/zellij
../../home/mako
../../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 = [
./hardware-configuration.nix
./services
./networking.nix
../../modules
../../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;
};
sora = {
hostname = "100.87.54.48";
hostname = "100.104.42.96";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.sora;

View file

@ -2,6 +2,7 @@
imports = [
./hardware-configuration.nix
./services
./networking.nix
../../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 = [
./hardware-configuration.nix
./services
./networking.nix
../../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";
type = "prometheus";
url = "http://100.87.54.48:9090";
url = "http://100.104.42.96:9090";
orgId = 1;
}
];

View file

@ -1,6 +1,14 @@
{modulesPath, ...}: {
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.kernelModules = ["nvme"];
fileSystems."/" = {

View file

@ -1,14 +1,12 @@
{lib, ...}: {
environment.etc = {
"resolv.conf".text = "nameserver 1.1.1.1\n";
};
networking = {
nameservers = [
"1.1.1.1"
"185.12.64.2"
"185.12.64.1"
];
defaultGateway = "172.31.1.1";
defaultGateway6 = {
address = "fe80::1";
address = "";
interface = "eth0";
};
dhcpcd.enable = false;
@ -17,36 +15,21 @@
eth0 = {
ipv4.addresses = [
{
address = "5.161.181.184";
address = "5.161.102.107";
prefixLength = 32;
}
];
ipv6.addresses = [
{
address = "2a01:4ff:f0:337a::1";
prefixLength = 64;
}
{
address = "fe80::9400:2ff:fe4e:83c1";
prefixLength = 64;
}
];
ipv4.routes = [
{
address = "172.31.1.1";
prefixLength = 32;
}
];
ipv6.routes = [
{
address = "fe80::1";
prefixLength = 128;
}
];
};
};
};
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
./gotify.nix
./tailscale.nix
./neko.nix
];
}

View file

@ -9,6 +9,7 @@
inputs.nix-gaming.nixosModules.pipewireLowLatency
./hardware-configuration.nix
./services
./networking.nix
../../home/wayland/hyprland/wayland.nix
../../modules
../../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 = [
./hardware-configuration.nix
./services
./networking.nix
../../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 = [
./hardware-configuration.nix
./services
./networking.nix
../../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;
}