This commit is contained in:
Chris Kruining 2026-03-25 16:26:04 +01:00
parent ac3dac322d
commit a7a1763fe0
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
105 changed files with 1152 additions and 1093 deletions

View file

@ -8,14 +8,14 @@
inherit (builtins) length;
inherit (lib) mkIf mkEnableOption mkOption types attrNames mapAttrs;
cfg = config.${namespace}.services.networking.caddy;
cfg = config.sneeuwvlok.services.networking.caddy;
hasHosts = (cfg.hosts |> attrNames |> length) > 0;
caddyPackage = pkgs.caddy.withPlugins {
plugins = ["github.com/corazawaf/coraza-caddy/v2@v2.1.0"];
hash = "sha256-rsDnTunR8C7hVOX5aKcba+iFYHbpWek65DZgbMxOdTs=";
};
in {
options.${namespace}.services.networking.caddy = {
options.sneeuwvlok.services.networking.caddy = {
enable = mkEnableOption "enable caddy" // {default = true;};
hosts = mkOption {

View file

@ -1,12 +1,15 @@
{ config, lib, namespace, ... }:
let
{
config,
lib,
namespace,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.${namespace}.services.networking.ssh;
in
{
options.${namespace}.services.networking.ssh = {
cfg = config.sneeuwvlok.services.networking.ssh;
in {
options.sneeuwvlok.services.networking.ssh = {
enable = mkEnableOption "enable ssh";
};
@ -14,10 +17,10 @@ in
services.openssh = {
enable = true;
openFirewall = true;
ports = [ 22 ];
ports = [22];
settings = {
PasswordAuthentication = true;
AllowUsers = [ "chris" "root" ];
AllowUsers = ["chris" "root"];
UseDns = true;
UsePAM = true;
PermitRootLogin = "prohibit-password";

View file

@ -8,10 +8,10 @@
inherit (builtins) length;
inherit (lib) mkIf mkEnableOption mkOption types attrNames attrsToList listToAttrs;
cfg = config.${namespace}.services.networking.wireguard;
cfg = config.sneeuwvlok.services.networking.wireguard;
hasPeers = (cfg.peer |> attrNames |> length) > 0;
in {
options.${namespace}.services.networking.wireguard = {
options.sneeuwvlok.services.networking.wireguard = {
# enable = mkEnableOption "enable wireguard" // {default = true;};
peer = mkOption {