feat: port Phase 1 foundational modules and setup comin in flake.nix
This commit is contained in:
parent
647ccfd6e2
commit
17de32268d
9 changed files with 196 additions and 0 deletions
5
modules/services/default.nix
Normal file
5
modules/services/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./openssh
|
||||
];
|
||||
}
|
||||
20
modules/services/openssh/default.nix
Normal file
20
modules/services/openssh/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homelab.services.openssh;
|
||||
in {
|
||||
options.homelab.services.openssh.enable = lib.mkEnableOption "OpenSSH daemon";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
# Enable the OpenSSH daemon.
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
# Disable keyboard-interactive authentication.
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue