| 30 Jul 2024 |
mjm | then yeah there's probably a user service that needs to be started | 15:11:02 |
Pratham Patel | which one? | 15:12:52 |
mjm | i don't know | 15:13:28 |
mjm | i use plasma so things get handled correctly out of the box | 15:13:46 |
K900 | plasma-kwallet-pam, according to the sources | 15:13:52 |
Pratham Patel | --user?
| 15:14:08 |
K900 | Yes | 15:15:06 |
K900 | And do not systemctl enable it | 15:15:10 |
K900 | Because that will break when the store paths change | 15:15:15 |
Pratham Patel | cat /run/current-system/sw/share/systemd/user/plasma-kwallet-pam.service
20:45:02|
--------+
[Unit]
Description=Unlock kwallet from pam credentials
PartOf=graphical-session.target
Before=plasma-plasmashell.service plasma-kded6.service
After=plasma-kwin_wayland.service plasma-kcminit.service
[Service]
ExecStart=/nix/store/53prdsd3na325rwg80f1w9bc1k9nlmff-kwallet-pam-6.0.5/libexec/pam_kwallet_init
Type=simple
Slice=background.slice
Restart=no
| 15:15:28 |
Pratham Patel | oh well, i was already executing that pam_init thingy from a shellscript that was called by bash, didn't work so called it before everything from hyprland, that didn't work either and calling it at the very end from hyprland doesn't work either | 15:16:12 |
K900 | Check PAM logs? | 15:16:55 |
Pratham Patel | aaaaaaaaa
-- Boot feb9acb032d5416fb9147e674873a02c --
Jul 30 20:39:33 indra systemd[1]: systemd 255.6 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
Jul 30 20:39:34 indra (systemd)[1231]: pam_unix(systemd-user:session): session opened for user pratham(uid=1000) by (uid=0)
Jul 30 20:39:37 indra sddm-helper[1673]: [PAM] Starting...
Jul 30 20:39:37 indra sddm-helper[1673]: [PAM] Authenticating...
Jul 30 20:39:37 indra sddm-helper[1673]: [PAM] returning.
Jul 30 20:39:37 indra (systemd)[1680]: pam_unix(systemd-user:session): session opened for user sddm(uid=175) by (uid=0)
Jul 30 20:39:48 indra sddm-helper[1730]: PAM unable to dlopen(/nix/store/xv5gzxvrkmsc3s6la4h81ng17wd9pzm6-kwallet-6.2.1/lib/security/pam_kwallet5.so): /nix/store/xv5gzxvrkmsc3s6la4h81ng17wd9pzm6-kwallet-6.2.1/lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Jul 30 20:39:48 indra sddm-helper[1730]: PAM adding faulty module: /nix/store/xv5gzxvrkmsc3s6la4h81ng17wd9pzm6-kwallet-6.2.1/lib/security/pam_kwallet5.so
Jul 30 20:39:48 indra sddm-helper[1730]: [PAM] Starting...
Jul 30 20:39:48 indra sddm-helper[1730]: [PAM] Authenticating...
Jul 30 20:39:48 indra sddm-helper[1730]: [PAM] Preparing to converse...
Jul 30 20:39:48 indra sddm-helper[1730]: [PAM] Conversation with 1 messages
Jul 30 20:39:48 indra sddm-helper[1730]: [PAM] returning.
Jul 30 20:39:48 indra sddm-helper[1730]: pam_unix(sddm:session): session opened for user pratham(uid=1000) by (uid=0)
Jul 30 20:39:48 indra sddm-helper[1673]: [PAM] Closing session
Jul 30 20:39:48 indra sddm-helper[1673]: [PAM] Ended.
Jul 30 20:39:51 indra wireplumber[1937]: [0:00:19.686900214] [1937] INFO IPAManager ipa_manager.cpp:143 libcamera is not installed. Adding '/nix/store/src/ipa' to the IPA search path
| 15:18:37 |
Pratham Patel | looking at it for the first time | 15:18:52 |
Pratham Patel | /nix/store/xv5gzxvrkmsc3s6la4h81ng17wd9pzm6-kwallet-6.2.1/lib/security/pam_kwallet5.so doesn't exist on disk
| 15:19:34 |
Pratham Patel | dependency issue? | 15:19:38 |
Pratham Patel | well /nix/store/xv5gzxvrkmsc3s6la4h81ng17wd9pzm6-kwallet-6.2.1/lib exists but not /nix/store/xv5gzxvrkmsc3s6la4h81ng17wd9pzm6-kwallet-6.2.1/lib/security
| 15:21:59 |
Pratham Patel | ah found it, it's set in nixpkgs
$ rg '/lib/security/pam_kwallet5.so' /etc/nixpkgs/channels/nixpkgs/
/etc/nixpkgs/channels/nixpkgs/nixos/modules/security/pam.nix
725: { name = "kwallet"; enable = cfg.kwallet.enable; control = "optional"; modulePath = "${cfg.kwallet.package}/lib/security/pam_kwallet5.so"; }
860: { name = "kwallet"; enable = cfg.kwallet.enable; control = "optional"; modulePath = "${cfg.kwallet.package}/lib/security/pam_kwallet5.so"; }
| 15:26:23 |
mjm | security.pam.services.login.kwallet.package = pkgs.kdePackages.kwallet; | 15:27:44 |
mjm | this is wrong | 15:27:46 |
mjm | should be pkgs.kdePackages.kwallet-pam | 15:27:54 |
mjm | that's what is set for plasma6 | 15:28:04 |
mjm | https://github.com/NixOS/nixpkgs/blob/b73c2221a46c13557b1b3be9c2070cc42cf01eb3/nixos/modules/services/desktop-managers/plasma6.nix#L267 | 15:28:14 |
Pratham Patel | ah you're right | 15:29:33 |
Pratham Patel | this change doesn't seem to work for tty logins
# git diff nixos-configuration/
diff --git a/nixos-configuration/includes/display-server/hyprland.nix b/nixos-configuration/includes/display-server/hyprland.nix
index 5309133..bb10061 100644
--- a/nixos-configuration/includes/display-server/hyprland.nix
+++ b/nixos-configuration/includes/display-server/hyprland.nix
@@ -8,7 +8,7 @@
services.hypridle.enable = true;
security.pam.services.login.kwallet.enable = true;
- security.pam.services.login.kwallet.package = pkgs.kdePackages.kwallet;
+ security.pam.services.login.kwallet.package = pkgs.kdePackages.kwallet-pam;
services.xserver.displayManager.lightdm.enable = lib.mkForce false;
environment.variables = {
| 15:34:37 |
Pratham Patel | trying sddm | 15:34:52 |
Pratham Patel | logging in from sddm doesn't work either :( | 15:41:43 |
Sandro 🐧 | In reply to @mjm:midna.dev yeah this was discussed in here yesterday, it's fixed in master do you have a link? | 15:45:01 |
mjm | i don't, sorry | 15:45:12 |
Pratham Patel | -- Boot 1435f0517bea465fa7e1ef75a8e97329 --
Jul 30 21:10:36 indra systemd[1]: systemd 255.6 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
Jul 30 21:10:37 indra (systemd)[1229]: pam_unix(systemd-user:session): session opened for user pratham(uid=1000) by (uid=0)
Jul 30 21:10:40 indra sddm-helper[1672]: [PAM] Starting...
Jul 30 21:10:40 indra sddm-helper[1672]: [PAM] Authenticating...
Jul 30 21:10:40 indra sddm-helper[1672]: [PAM] returning.
Jul 30 21:10:40 indra (systemd)[1679]: pam_unix(systemd-user:session): session opened for user sddm(uid=175) by (uid=0)
Jul 30 21:11:03 indra sddm-helper[1732]: [PAM] Starting...
Jul 30 21:11:03 indra sddm-helper[1732]: [PAM] Authenticating...
Jul 30 21:11:03 indra sddm-helper[1732]: [PAM] Preparing to converse...
Jul 30 21:11:03 indra sddm-helper[1732]: [PAM] Conversation with 1 messages
Jul 30 21:11:03 indra sddm-helper[1732]: pam_kwallet5(sddm:auth): pam_kwallet5: pam_sm_authenticate
Jul 30 21:11:03 indra sddm-helper[1732]: [PAM] returning.
Jul 30 21:11:03 indra sddm-helper[1732]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Jul 30 21:11:03 indra sddm-helper[1732]: pam_unix(sddm:session): session opened for user pratham(uid=1000) by (uid=0)
Jul 30 21:11:03 indra sddm-helper[1672]: [PAM] Closing session
Jul 30 21:11:03 indra sddm-helper[1672]: [PAM] Ended.
Jul 30 21:11:03 indra sddm-helper[1732]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
Jul 30 21:11:03 indra sddm-helper[1746]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Jul 30 21:11:05 indra wireplumber[1942]: [0:00:31.523604245] [1942] INFO IPAManager ipa_manager.cpp:143 libcamera is not installed. Adding '/nix/store/src/ipa' to the IPA search path
| 15:45:36 |