mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-09-20 00:59:04 +05:30
28 lines
581 B
Nix
28 lines
581 B
Nix
{
|
|
flake.modules.nixos.networking = {
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.tnix.networking.newt;
|
|
in {
|
|
options.tnix.networking.newt = {
|
|
enable = mkEnableOption "Newt";
|
|
|
|
environmentFile = mkOption {
|
|
type = types.nullOr types.path;
|
|
default = null;
|
|
description = "Environment file with secrets passed to Newt";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.newt = {
|
|
enable = true;
|
|
environmentFile = cfg.environmentFile;
|
|
};
|
|
};
|
|
};
|
|
}
|