mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-25 14:41:44 +00:00
Working Config With Libs!
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
{ lib, config, pkgs, ... }: {
|
||||
{ lib, pkgs, config, ... }:
|
||||
with lib;
|
||||
|
||||
let cfg = config.custom.sshd;
|
||||
in {
|
||||
|
||||
#define option to enable this
|
||||
options.mymods.sshd.enable = lib.mkEnableOption "Enable SSH";
|
||||
options.custom.sshd.enable = mkEnableOption "Enable SSH";
|
||||
|
||||
config = lib.mkIf config.mymods.sshd.enable {
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.permitRootLogin = "no";
|
||||
settings.passwordAuthentication = false;
|
||||
permitRootLogin = "no";
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
Reference in New Issue
Block a user