Moved firewall & networking

This commit is contained in:
ari committed 2024-08-18 21:11:59 -04:00
1 parent 4b03beb264
commit 818e0f3ff3
7 files changed
+37 -51

No files matched your search

+1
View File
@@ -3,6 +3,7 @@
imports = [
./hardware
./core.nix
./networking.nix
./user.nix
./ssh-server.nix
];
+34
View File
@@ -0,0 +1,34 @@
{ config, lib, ... }:
with lib;
let
cfg = config.skyg.core;
in
{
options = {
skyg.core = {
hostName = mkOption {
description = "Machine Hostname";
type = types.str;
};
};
};
config = {
# Define hostname.
networking.hostName = cfg.hostName;
# Enable networking
networking.networkmanager.enable = true;
# NFS Support
services.nfs.server.enable = true;
# Tailscale
services.tailscale.enable = true;
services.tailscale.useRoutingFeatures = "client";
# Disable the flaky nm service
systemd.services.NetworkManager-wait-online.enable = false;
};
}
+1
View File
@@ -18,6 +18,7 @@ in
config = mkIf cfg.enabled {
services.openssh = {
enable = true;
openFirewall = true;
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
settings.PermitRootLogin = "yes";
+1 -9
View File
@@ -15,15 +15,7 @@
user = user;
} // containers))
]
++ (if enableNetworking then
[
(import ./networking.nix {
hostName = hostName;
firewall = firewall;
})
]
else
[ ]) ++ (if enableSSH then
++ (if enableSSH then
[
(import ./ssh.nix {
enableSSHServer = true;
-20
View File
@@ -1,20 +0,0 @@
{ hostName, firewall }:
{ pkgs, ... }:
{
# Define your hostname.
networking.hostName = hostName;
# Enable networking
networking.networkmanager.enable = true;
networking.firewall = firewall;
# NFS Support
services.nfs.server.enable = true;
# Tailscale
services.tailscale.enable = true;
services.tailscale.useRoutingFeatures = "client";
# Disable the flaky nm service
systemd.services.NetworkManager-wait-online.enable = false;
}
-21
View File
@@ -1,21 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.skyg.core;
in
{
options = {
skyg.core = {
hostName = mkOption {
description = "Machine Hostname";
type = types.str;
};
};
};
config = {
networking.hostName = cfg.hostName;
};
}
-1
View File
@@ -1,7 +1,6 @@
{ ... }:
{
imports = [
./core.nix
./user.nix
./macos.nix
./fonts.nix