nixos/krb5: move to security.krb5
This commit is contained in:
parent
92a541c0ed
commit
fed77d1705
14 changed files with 22 additions and 22 deletions
|
@ -94,7 +94,7 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
||||||
- `services.zfs.zed.enableMail` now uses the global `sendmail` wrapper defined by an email module
|
- `services.zfs.zed.enableMail` now uses the global `sendmail` wrapper defined by an email module
|
||||||
(such as msmtp or Postfix). It no longer requires using a special ZFS build with email support.
|
(such as msmtp or Postfix). It no longer requires using a special ZFS build with email support.
|
||||||
|
|
||||||
- The `krb5` module has been rewritten, moving all options but `krb5.enable` and `krb5.package` into `krb5.settings`.
|
- The `krb5` module has been rewritten and moved to `security.krb5`, moving all options but `security.krb5.enable` and `security.krb5.package` into `security.krb5.settings`.
|
||||||
|
|
||||||
- Gitea 1.21 upgrade has several breaking changes, including:
|
- Gitea 1.21 upgrade has several breaking changes, including:
|
||||||
- Custom themes and other assets that were previously stored in `custom/public/*` now belong in `custom/public/assets/*`
|
- Custom themes and other assets that were previously stored in `custom/public/*` now belong in `custom/public/assets/*`
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
./config/gtk/gtk-icon-cache.nix
|
./config/gtk/gtk-icon-cache.nix
|
||||||
./config/i18n.nix
|
./config/i18n.nix
|
||||||
./config/iproute2.nix
|
./config/iproute2.nix
|
||||||
./config/krb5/default.nix
|
|
||||||
./config/ldap.nix
|
./config/ldap.nix
|
||||||
./config/ldso.nix
|
./config/ldso.nix
|
||||||
./config/locale.nix
|
./config/locale.nix
|
||||||
|
@ -308,6 +307,7 @@
|
||||||
./security/duosec.nix
|
./security/duosec.nix
|
||||||
./security/google_oslogin.nix
|
./security/google_oslogin.nix
|
||||||
./security/ipa.nix
|
./security/ipa.nix
|
||||||
|
./security/krb5
|
||||||
./security/lock-kernel-modules.nix
|
./security/lock-kernel-modules.nix
|
||||||
./security/misc.nix
|
./security/misc.nix
|
||||||
./security/oath.nix
|
./security/oath.nix
|
||||||
|
|
|
@ -117,8 +117,8 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = !config.krb5.enable;
|
assertion = !config.security.krb5.enable;
|
||||||
message = "krb5 must be disabled through `krb5.enable` for FreeIPA integration to work.";
|
message = "krb5 must be disabled through `security.krb5.enable` for FreeIPA integration to work.";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
assertion = !config.users.ldap.enable;
|
assertion = !config.users.ldap.enable;
|
||||||
|
|
|
@ -5,11 +5,11 @@ let
|
||||||
|
|
||||||
mkRemovedOptionModule' = name: reason: mkRemovedOptionModule ["krb5" name] reason;
|
mkRemovedOptionModule' = name: reason: mkRemovedOptionModule ["krb5" name] reason;
|
||||||
mkRemovedOptionModuleCfg = name: mkRemovedOptionModule' name ''
|
mkRemovedOptionModuleCfg = name: mkRemovedOptionModule' name ''
|
||||||
The option `krb5.${name}' has been removed. Use `krb5.settings.${name}' for
|
The option `krb5.${name}' has been removed. Use
|
||||||
structured configuration.
|
`security.krb5.settings.${name}' for structured configuration.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cfg = config.krb5;
|
cfg = config.security.krb5;
|
||||||
format = import ./krb5-conf-format.nix { inherit pkgs lib; } { };
|
format = import ./krb5-conf-format.nix { inherit pkgs lib; } { };
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -22,12 +22,12 @@ in {
|
||||||
(mkRemovedOptionModuleCfg "config")
|
(mkRemovedOptionModuleCfg "config")
|
||||||
(mkRemovedOptionModuleCfg "extraConfig")
|
(mkRemovedOptionModuleCfg "extraConfig")
|
||||||
(mkRemovedOptionModule' "kerberos" ''
|
(mkRemovedOptionModule' "kerberos" ''
|
||||||
The option `krb5.kerberos' has been moved to `krb5.package'.
|
The option `krb5.kerberos' has been moved to `security.krb5.package'.
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
krb5 = {
|
security.krb5 = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = mdDoc "Enable and configure Kerberos utilities";
|
description = mdDoc "Enable and configure Kerberos utilities";
|
|
@ -1067,8 +1067,8 @@ in
|
||||||
|
|
||||||
security.pam.krb5 = {
|
security.pam.krb5 = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = config.krb5.enable;
|
default = config.security.krb5.enable;
|
||||||
defaultText = literalExpression "config.krb5.enable";
|
defaultText = literalExpression "config.security.krb5.enable";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Enables Kerberos PAM modules (`pam-krb5`,
|
Enables Kerberos PAM modules (`pam-krb5`,
|
||||||
|
@ -1076,7 +1076,7 @@ in
|
||||||
|
|
||||||
If set, users can authenticate with their Kerberos password.
|
If set, users can authenticate with their Kerberos password.
|
||||||
This requires a valid Kerberos configuration
|
This requires a valid Kerberos configuration
|
||||||
(`config.krb5.enable` should be set to
|
(`config.security.krb5.enable` should be set to
|
||||||
`true`).
|
`true`).
|
||||||
|
|
||||||
Note that the Kerberos PAM modules are not necessary when using SSS
|
Note that the Kerberos PAM modules are not necessary when using SSS
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption mkIf types length attrNames;
|
inherit (lib) mkOption mkIf types length attrNames;
|
||||||
cfg = config.services.kerberos_server;
|
cfg = config.services.kerberos_server;
|
||||||
kerberos = config.krb5.package;
|
kerberos = config.security.krb5.package;
|
||||||
|
|
||||||
aclEntry = {
|
aclEntry = {
|
||||||
options = {
|
options = {
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
inherit (lib) mkIf concatStringsSep concatMapStrings toList mapAttrs
|
inherit (lib) mkIf concatStringsSep concatMapStrings toList mapAttrs
|
||||||
mapAttrsToList;
|
mapAttrsToList;
|
||||||
cfg = config.services.kerberos_server;
|
cfg = config.services.kerberos_server;
|
||||||
kerberos = config.krb5.package;
|
kerberos = config.security.krb5.package;
|
||||||
stateDir = "/var/heimdal";
|
stateDir = "/var/heimdal";
|
||||||
aclFiles = mapAttrs
|
aclFiles = mapAttrs
|
||||||
(name: {acl, ...}: pkgs.writeText "${name}.acl" (concatMapStrings ((
|
(name: {acl, ...}: pkgs.writeText "${name}.acl" (concatMapStrings ((
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
inherit (lib) mkIf concatStrings concatStringsSep concatMapStrings toList
|
inherit (lib) mkIf concatStrings concatStringsSep concatMapStrings toList
|
||||||
mapAttrs mapAttrsToList;
|
mapAttrs mapAttrsToList;
|
||||||
cfg = config.services.kerberos_server;
|
cfg = config.services.kerberos_server;
|
||||||
kerberos = config.krb5.package;
|
kerberos = config.security.krb5.package;
|
||||||
stateDir = "/var/lib/krb5kdc";
|
stateDir = "/var/lib/krb5kdc";
|
||||||
PIDFile = "/run/kdc.pid";
|
PIDFile = "/run/kdc.pid";
|
||||||
aclMap = {
|
aclMap = {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ../make-test-python.nix ({pkgs, ...}: {
|
||||||
"FOO.BAR".acl = [{principal = "admin"; access = ["add" "cpw"];}];
|
"FOO.BAR".acl = [{principal = "admin"; access = ["add" "cpw"];}];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
krb5 = {
|
security.krb5 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.heimdal;
|
package = pkgs.heimdal;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ../make-test-python.nix ({pkgs, ...}: {
|
||||||
"FOO.BAR".acl = [{principal = "admin"; access = ["add" "cpw"];}];
|
"FOO.BAR".acl = [{principal = "admin"; access = ["add" "cpw"];}];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
krb5 = {
|
security.krb5 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.krb5;
|
package = pkgs.krb5;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import ../make-test-python.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
nodes.machine =
|
nodes.machine =
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
krb5 = {
|
security.krb5 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.krb5;
|
package = pkgs.krb5;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import ../make-test-python.nix ({ pkgs, lib, ... }:
|
import ../make-test-python.nix ({ pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
krb5 = {
|
security.krb5 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
domain_realm."nfs.test" = "NFS.TEST";
|
domain_realm."nfs.test" = "NFS.TEST";
|
||||||
|
@ -34,7 +34,7 @@ in
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
client = { lib, ... }:
|
client = { lib, ... }:
|
||||||
{ inherit krb5 users;
|
{ inherit security users;
|
||||||
|
|
||||||
networking.extraHosts = hosts;
|
networking.extraHosts = hosts;
|
||||||
networking.domain = "nfs.test";
|
networking.domain = "nfs.test";
|
||||||
|
@ -50,7 +50,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
server = { lib, ...}:
|
server = { lib, ...}:
|
||||||
{ inherit krb5 users;
|
{ inherit security users;
|
||||||
|
|
||||||
networking.extraHosts = hosts;
|
networking.extraHosts = hosts;
|
||||||
networking.domain = "nfs.test";
|
networking.domain = "nfs.test";
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ../make-test-python.nix ({ pkgs, ... }: {
|
||||||
nodes.machine = { ... }: {
|
nodes.machine = { ... }: {
|
||||||
imports = [ ../../modules/profiles/minimal.nix ];
|
imports = [ ../../modules/profiles/minimal.nix ];
|
||||||
|
|
||||||
krb5.enable = true;
|
security.krb5.enable = true;
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
|
|
Loading…
Reference in a new issue