summaryrefslogtreecommitdiff
path: root/modules/xnet/net/default.nix
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2024-12-01 22:30:26 -0500
committerKleidi Bujari <mail@4kb.net>2024-12-01 22:30:26 -0500
commitf08f3812f40322b6098d75573413ed83f358871f (patch)
tree0f864c4695dab404e261e6bf179cfc1b04d6c7f5 /modules/xnet/net/default.nix
parent3ccc7e784a0ed5b19910ab856f6d9774a6f27956 (diff)
downloaddepot-f08f3812f40322b6098d75573413ed83f358871f.tar.gz
depot-f08f3812f40322b6098d75573413ed83f358871f.tar.bz2
depot-f08f3812f40322b6098d75573413ed83f358871f.zip
Cleanup xnet module and add baseline modules
With these changes, the xnet module is useable as a system builder. At this point, it is still undecided whether all configuration will be generalized into this module, rather than keeping mini-modules local to the machine they will run on.
Diffstat (limited to 'modules/xnet/net/default.nix')
-rw-r--r--modules/xnet/net/default.nix33
1 files changed, 4 insertions, 29 deletions
diff --git a/modules/xnet/net/default.nix b/modules/xnet/net/default.nix
index 143f189..2255f53 100644
--- a/modules/xnet/net/default.nix
+++ b/modules/xnet/net/default.nix
@@ -5,6 +5,10 @@ let
prefix = "10.26.4";
in
{
+ imports = [
+ ./sshd.nix
+ ];
+
options.xnet.net = {
interface = mkOption {
type = types.str;
@@ -17,12 +21,6 @@ in
description = "Final octet for xnet address.";
example = 4;
};
-
- sshd = mkOption {
- type = types.bool;
- default = false;
- description = "Enable hardened SSH service.";
- };
};
# TODO:
@@ -42,28 +40,5 @@ in
prefixLength = 24;
}];
};
-
- services.openssh = {
- enable = cfg.sshd;
- startWhenNeeded = true;
- settings = {
- X11Forwarding = false;
- UsePAM = false;
- PermitRootLogin = "prohibit-password";
- };
- extraConfig =
- let
- p = [
- "sk-ssh-ed25519-cert-v01@openssh.com"
- "ssh-ed25519-cert-v01@openssh.com"
- "ssh-ed25519"
- ];
- in
- "PubkeyAcceptedKeyTypes ${lib.strings.concatStringsSep "," p}";
- hostKeys = [{
- path = "/certs/ssh/ssh_host_ed25519_key";
- type = "ed25519";
- }];
- };
};
}