feat: move networking to modules

This commit is contained in:
notohh 2023-04-02 09:12:41 -04:00
parent 67a0afe698
commit e4ab80df8f
Signed by: notohh
GPG key ID: BD47506D475EE86D
5 changed files with 23 additions and 29 deletions

View file

@ -1,5 +1,4 @@
{
config,
pkgs,
...
}: {
@ -17,6 +16,10 @@
useOSProber = false;
};
};
networking = {
hostName = "hime";
};
time.timeZone = "America/New_York";
@ -73,15 +76,6 @@
nfs-utils
];
networking = {
hostName = "hime";
networkmanager.enable = true;
firewall ={
enable = true;
};
nameservers = [ "192.168.1.86" ];
};
nix = {
package = pkgs.nixFlakes;
extraOptions = ''

View file

@ -16,6 +16,10 @@
};
};
networking = {
hostName = "sutakku";
};
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
@ -62,15 +66,6 @@
services.openssh.enable = true;
networking = {
hostName = "sutakku";
networkmanager.enable = true;
firewall = {
enable = true;
};
nameservers = [ "192.168.1.86" ];
};
nix = {
package = pkgs.nixFlakes;
extraOptions = ''

View file

@ -30,17 +30,7 @@
virtualisation.libvirtd.enable = true;
networking = {
networkmanager.enable = true;
nameservers = [ "192.168.1.86" ];
hostName = "tsuki";
firewall = {
enable = true;
};
};
# pihole
environment.etc = {
"resolv.conf".text = "nameserver 192.168.1.86\n";
};
time.timeZone = "America/New_York";

View file

@ -5,5 +5,6 @@
./tailscale.nix
./security.nix
./udevd.nix
./networking.nix
];
}

14
modules/networking.nix Normal file
View file

@ -0,0 +1,14 @@
{
...
}: {
networking = {
networkmanager.enable = true;
nameservers = [ "192.168.1.86" ];
firewall = {
enable = true;
};
};
environment.etc = {
"resolv.conf".text = "nameserver 192.168.1.86\n";
};
}