14 inherit (lib.types) bool;
16 mkRemovedOptionModule' = name: reason: mkRemovedOptionModule [ "krb5" name ] reason;
17 mkRemovedOptionModuleCfg =
19 mkRemovedOptionModule' name ''
20 The option `krb5.${name}' has been removed. Use
21 `security.krb5.settings.${name}' for structured configuration.
24 cfg = config.security.krb5;
25 format = import ./krb5-conf-format.nix { inherit pkgs lib; } { };
29 (mkRemovedOptionModuleCfg "libdefaults")
30 (mkRemovedOptionModuleCfg "realms")
31 (mkRemovedOptionModuleCfg "domain_realm")
32 (mkRemovedOptionModuleCfg "capaths")
33 (mkRemovedOptionModuleCfg "appdefaults")
34 (mkRemovedOptionModuleCfg "plugins")
35 (mkRemovedOptionModuleCfg "config")
36 (mkRemovedOptionModuleCfg "extraConfig")
37 (mkRemovedOptionModule' "kerberos" ''
38 The option `krb5.kerberos' has been moved to `security.krb5.package'.
46 description = "Enable and configure Kerberos utilities";
50 package = mkPackageOption pkgs "krb5" {
58 Structured contents of the {file}`krb5.conf` file. See
59 {manpage}`krb5.conf(5)` for details about configuration.
62 include = [ "/run/secrets/secret-krb5.conf" ];
63 includedir = [ "/run/secrets/secret-krb5.conf.d" ];
66 default_realm = "ATHENA.MIT.EDU";
71 admin_server = "athena.mit.edu";
80 "mit.edu" = "ATHENA.MIT.EDU";
84 kdc = "SYSLOG:NOTICE";
85 admin_server = "SYSLOG:NOTICE";
86 default = "SYSLOG:NOTICE";
94 assertions = mkIf (cfg.enable || config.services.kerberos_server.enable) [
97 implementation = cfg.package.passthru.implementation or "<NOT SET>";
100 assertion = lib.elem implementation [
105 `security.krb5.package` must be one of:
110 Currently chosen implementation: ${implementation}
116 environment = mkIf cfg.enable {
117 systemPackages = [ cfg.package ];
118 etc."krb5.conf".source = format.generate "krb5.conf" cfg.settings;
122 meta.maintainers = builtins.attrValues {
123 inherit (lib.maintainers) dblsaiko h7x4;