Moved firewall & networking
This commit is contained in:
1 parent
4b03beb264
commit
818e0f3ff3
7 files changed
+37
-51
No files matched your search
@@ -3,6 +3,7 @@
|
||||
imports = [
|
||||
./hardware
|
||||
./core.nix
|
||||
./networking.nix
|
||||
./user.nix
|
||||
./ssh-server.nix
|
||||
];
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
@@ -18,6 +18,7 @@ in
|
||||
config = mkIf cfg.enabled {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "yes";
|
||||
|
||||
Reference in new issue
Block a user