nixos/{greetd, ly}: substack login in PAM (#526154)

This commit is contained in:
Masum Reza
2026-07-24 19:43:36 +00:00
committed by GitHub
2 changed files with 63 additions and 6 deletions
@@ -1,6 +1,7 @@
{
config,
lib,
utils,
pkgs,
...
}:
@@ -76,9 +77,37 @@ in
services.greetd.settings.default_session.user = lib.mkDefault "greeter";
security.pam.services.greetd = {
allowNullPassword = true;
startSession = true;
enableGnomeKeyring = lib.mkDefault config.services.gnome.gnome-keyring.enable;
useDefaultRules = false;
rules = {
auth = utils.pam.autoOrderRules [
{
name = "login";
control = "substack";
modulePath = "login";
}
];
account = utils.pam.autoOrderRules [
{
name = "login";
control = "include";
modulePath = "login";
}
];
password = utils.pam.autoOrderRules [
{
name = "login";
control = "substack";
modulePath = "login";
}
];
session = utils.pam.autoOrderRules [
{
name = "login";
control = "include";
modulePath = "login";
}
];
};
};
# This prevents nixos-rebuild from killing greetd by activating getty again
+31 -3
View File
@@ -100,9 +100,37 @@ in
security.pam.services = {
ly = {
startSession = true;
unixAuth = true;
enableGnomeKeyring = lib.mkDefault config.services.gnome.gnome-keyring.enable;
useDefaultRules = false;
rules = {
auth = utils.pam.autoOrderRules [
{
name = "login";
control = "substack";
modulePath = "login";
}
];
account = utils.pam.autoOrderRules [
{
name = "login";
control = "include";
modulePath = "login";
}
];
password = utils.pam.autoOrderRules [
{
name = "login";
control = "substack";
modulePath = "login";
}
];
session = utils.pam.autoOrderRules [
{
name = "login";
control = "include";
modulePath = "login";
}
];
};
};
}
// optionalAttrs dmcfg.autoLogin.enable {