guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#62357] [PATCH] services: base: add pam-mount-volume support for gre


From: Brian Cully
Subject: [bug#62357] [PATCH] services: base: add pam-mount-volume support for greetd
Date: Tue, 21 Mar 2023 17:09:10 -0400
User-agent: mu4e 1.8.13; emacs 28.2


Brian Cully <bjc@spork.org> writes:

This patch lets users create mounts automatically on login with the greetd service by adding `pam-mount-volume' records via the `extra-pam-mount-volumes'
field of `greetd-configuration'.

The existing rules for XDG_RUNTIME_DIR have been migrated to
`%base-pam-mount-volumes' and are installed by default.

* gnu/services/base.scm (<pam-mount-volume>): new record
(pam-mount-volume->sxml): new procedure
(%base-pam-mount-volumes): new variable
(greetd-pam-mount-rules): new function
(%greetd-pam-mount-rules): removed variable
(<greetd-configuration>): new field `extra-pam-mount-volumes'

I know this patch will need documentation, but I've also assumed there'll be some discussion around whether or not this is the best way to proceed, so I'm delaying writing it until there's consensus.

FWIW, the main use-case of this patch, for me, is auto-mounting samba shares from a NAS which requires authentication. By using the PAM mount facility, as long as my local and remote credentials match, everything happens automatically at login without needing to type my password twice, and this lets login scripts use the remote services as well.

I'm sure there are countless other ways to use it, but this is mine.

It would be nice to have this more generic, since pam-mount isn't specifically tied to greetd, but it seems like greetd is the only thing in Guix that uses it currently, so that's why that's the only hook I've added. I've named the various symbols to express that they belong to PAM, generally, or greetd, specifically.

-bjc





reply via email to

[Prev in Thread] Current Thread [Next in Thread]