holy shit im stupid, a lot of changes.

also added the configuration bc idk how to add only certain files but
whatever
This commit is contained in:
2026-07-05 23:42:52 -05:00
parent 4f9269315b
commit 4e925f8a89
10 changed files with 40 additions and 50 deletions
+6 -6
View File
@@ -3,24 +3,24 @@ let
cfg = config.homelab.networking.core;
in
{
config = {
imports = [
./firewall.nix
];
imports = [
./firewall.nix
];
config = {
networking = {
networkmanager = {
enable = true;
dns = "systemd-resolved";
};
networking.extraHosts = lib.concatMapStringsSep "\n" (
extraHosts = lib.concatMapStringsSep "\n" (
host: "${host.ip_address} ${host.hostname}"
) cfg.extraHosts;
nftables.enable = true;
nameservers = config.core.nameservers;
nameservers = cfg.nameservers;
};
services.resolved = {
+2 -2
View File
@@ -1,8 +1,8 @@
{ ... }:
{
imports = [
./options.nix
./core
./wireguard.nix
./tailscale.nix
];
}
+2 -6
View File
@@ -13,8 +13,7 @@
# core
core = {
firewall = {
allowPing = lib.mkEnableOption "Enable ICMP Pinging" {
enable = true;
allowPing = lib.mkEnableOption "ICMP pinging" // {
default = true;
};
@@ -117,10 +116,7 @@
# tailscale
tailscale = {
enable = lib.mkEnableOption "Enable Tailscale Mesh VPN" {
enable = true;
default = false;
};
enable = lib.mkEnableOption "Tailscale mesh VPN";
};
};
}
+3 -2
View File
@@ -1,13 +1,14 @@
{ config, lib, ... }:
let
cfg = config.homelab.networking.tailscale;
user = config.homelab.networking.user;
in
{
config = lib.mkIf cfg.enable {
services.tailscale = {
enable = true;
openFirewall = true;
extraSetFlags = [ "--operator=${cfg.user}" ];
extraSetFlags = [ "--operator=${user}" ];
};
networking.firewall = {
@@ -22,7 +23,7 @@ in
systemd.network.wait-online.enable = false;
boot.initrd.systemd.network.wait-online.enable = false;
users.users.${cfg.user}.extraGroups = [
users.users.${user}.extraGroups = [
"tailscale"
];
};