aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/security-token.scm
blob: d971091e732ae61c234b507357425360b5bb124d (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu services security-token)
  #:use-module (gnu services)
  #:use-module (gnu services shepherd)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages base)
  #:use-module (gnu packages security-token)
  #:use-module (gnu system shadow)
  #:use-module (guix gexp)
  #:use-module (guix modules)
  #:use-module (guix records)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-26)
  #:export (pcscd-configuration
            pcscd-configuration?
            pcscd-configuration-pcsc-lite
            pcscd-configuration-usb-drivers
            pcscd-service-type))

;;;
;;; PC/SC Smart Card Daemon
;;;

(define-record-type* <pcscd-configuration>
  pcscd-configuration make-pcscd-configuration pcscd-configuration?
  (pcsc-lite pcscd-configuration-pcsc-lite
             (default pcsc-lite))
  (usb-drivers pcscd-configuration-usb-drivers
               (default (list ccid))))

(define pcscd-shepherd-service
  (match-lambda
    (($ <pcscd-configuration> pcsc-lite)
     (shepherd-service
      (documentation "PC/SC Smart Card Daemon")
      (provision '(pcscd))
      (requirement '(syslogd))
      (start #~(lambda _
                 (let ((socket "/run/pcscd/pcscd.comm"))
                   (when (file-exists? socket)
                     (delete-file socket)))
                 (fork+exec-command
                  (list #$(file-append pcsc-lite "/sbin/pcscd")
                        "--foreground")
                  #:log-file "/var/log/pcscd.log")))
      (stop #~(make-kill-destructor))))))

(define pcscd-activation
  (match-lambda
    (($ <pcscd-configuration> pcsc-lite usb-drivers)
     (with-imported-modules (source-module-closure
                             '((guix build utils)))
       #~(begin
           (use-modules (guix build utils))

           (mkdir-p "/var/lib")
           (switch-symlinks "/var/lib/pcsc"
                            #$(directory-union
                               "pcsc"
                               (map (cut file-append <> "/pcsc")
                                    usb-drivers))))))))

(define pcscd-service-type
  (service-type
   (name 'pcscd)
   (description
    "Run @command{pcscd}, the PC/SC smart card daemon.")
   (extensions
    (list (service-extension shepherd-root-service-type
                             (compose list pcscd-shepherd-service))
          (service-extension activation-service-type
                             pcscd-activation)))
   (default-value (pcscd-configuration))))
example code to use the ‘privileged-program(s)’ terminology. * doc/guix-cookbook.texi (Network bridge for QEMU): Likewise. * gnu/packages/disk.scm (udevil)[arguments]: Update a comment. Change-Id: I7f467e8743a3ef556cd89bac41509bf51d9edb30 Tobias Geerinckx-Rice 2024-08-11gnu: Replace (almost) all uses of /run/setuid-programs....…those good for master, anyway. * gnu/packages/admin.scm (ktsuss, opendoas, hosts) [arguments]: Replace /run/setuid-programs with /run/privileged/bin. * gnu/packages/containers.scm (slirp4netns)[arguments]: Likewise. * gnu/packages/debian.scm (pbuilder)[arguments]: Likewise. * gnu/packages/disk.scm (udevil)[arguments]: Likewise. * gnu/packages/enlightenment.scm (efl, enlightenment) [arguments]: Likewise. * gnu/packages/gnome.scm (gdm, gnome-control-center) [arguments]: Likewise. * gnu/packages/linux.scm (singularity)[arguments]: Likewise. * gnu/packages/lxde.scm (spacefm)[arguments]: Likewise. * gnu/packages/monitoring.scm (zabbix-agentd)[arguments]: Likewise. * gnu/packages/virtualization.scm (ganeti)[arguments]: Likewise. * gnu/packages/xdisorg.scm (xsecurelock)[arguments]: Likewise. * gnu/services/dbus.scm (dbus-configuration-directory): Likewise. * gnu/services/ganeti.scm (%default-ganeti-environment-variables): Likewise. * gnu/services/monitoring.scm (zabbix-agent-shepherd-service): Likewise. * gnu/tests/ldap.scm (marionette): Likewise. * gnu/tests/monitoring.scm (os): Likewise. Tobias Geerinckx-Rice 2024-07-15gnu: packages/golang: Set default go version to 1.21....Golang versions 1.17 (02 Aug 2022), 1.18 (01 Feb 2023), 1.19 (06 Sep 2023) and 1.20 (06 Feb 2024) are EOL <https://endoflife.date/go>. These changes set preferable default version to the minimal currently maintained one e.g. 1.21 * gnu/packages/golang.scm (go): Set default to go-1.21, add annotation for the future maintenance. Remove field <#:go> setting Golang version to go-1.18, go-1.19, 1.20 and 1.21: * gnu/packages/admin.scm * gnu/packages/configuration-management.scm * gnu/packages/databases.scm * gnu/packages/disk.scm * gnu/packages/education.scm * gnu/packages/file-systems.scm * gnu/packages/finance.scm * gnu/packages/golang-check.scm * gnu/packages/golang-crypto.scm * gnu/packages/golang-web.scm * gnu/packages/golang-xyz.scm * gnu/packages/golang.scm * gnu/packages/high-availability.scm * gnu/packages/ipfs.scm * gnu/packages/irc.scm * gnu/packages/messaging.scm * gnu/packages/networking.scm * gnu/packages/syncthing.scm * gnu/packages/textutils.scm * gnu/packages/time.scm * gnu/packages/version-control.scm * gnu/packages/video.scm Change-Id: Ieba6a5d7a18423f838d14c02ad55a2ba9c8559eb Sharlatan Hellseher 2024-06-18gnu: rmlint: Use default scons....* gnu/packages/disk.scm (rmlint): Use default scons. Change-Id: I84f66876f8acaee719f657ca85693bc23a8d0c4d Signed-off-by: jgart <jgart@dismail.de> Nicolas Graves 2024-04-06gnu: lf: Refresh package style....* gnu/packages/disk.scm (lf): Adjust indentation. [arguments]: Use list style. Add <#:install-source?>. [native-inputs]: Sort alphabetically, move after arguments. [description]: Use texinfo style, adjust indentation. Change-Id: I7ce733139ca9a1514329cc1034de8f21c100b855 Sharlatan Hellseher 2024-04-06gnu: lf: Update to 31....* gnu/packages/disk.scm (lf): Update to 31. [arguments] <#:go>: Use go-1.18. [native-inputs]: Remove go-github-com-gdamore-tcell-v2-2.3; add go-github-com-gdamore-tcell-v2 and go-github-com-djherbis-times. * gnu/packages/golang.scm (go-github-com-gdamore-tcell-v2-2.3): Remove variable. Change-Id: I02f675eeb74a2a08dd153ca64619bd6a8f23943c Sharlatan Hellseher 2024-04-06gnu: go-github-com-mattn-go-runewidth: Move to golang-xyz....* gnu/packages/golang.scm (go-github-com-mattn-go-runewidth): Move from here ... * gnu/packages/golang-xyz.scm: ... to here. * gnu/packages/check.scm: Add (gnu packages golang-xyz) module. * gnu/packages/disk.scm: Likewise. * gnu/packages/messaging.scm: Likewise. * gnu/packages/time.scm: Likewise. * gnu/packages/weather.scm: Likewise. Change-Id: I80f8b4c31c0fd8fee7c190a7740513ee139646d4 Sharlatan Hellseher 2024-04-05gnu: nwipe: Update to 0.36....* gnu/packages/disk.scm (nwipe): Update to 0.36. Change-Id: I71e6714118cfc2a98e19373b3db80188903a63c3 Signed-off-by: Christopher Baines <mail@cbaines.net> Timotej Lazar 2024-03-30gnu: ddrescue: Update to 1.28....* gnu/packages/disk.scm (ddrescue): Update to 1.28. Change-Id: I6211c020890df293312d7c5cf213c12467fc9d00 Vinicius Monego 2024-03-24gnu: duc: Update style....* gnu/packages/disk.scm (duc) [arguments]: Convert to list of G-Expressions. Change-Id: Iefcdcc55b1e71f7e866cb04795ef74f3b675cfce Signed-off-by: Christopher Baines <mail@cbaines.net> Vivien Kraus 2024-03-24gnu: duc: Fix build....* gnu/packages/patches/duc-fix-test-sh.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/disk.scm (duc): Use it here. Change-Id: I664614dc35fb88f8ee63dbe727a38f17f4af0f8e Signed-off-by: Christopher Baines <mail@cbaines.net> Vivien Kraus 2024-02-13gnu: go-golang-org-x-term: Move to golang-build....* gnu/packages/golang.scm (go-golang-org-x-term): Move from here ... * gnu/packages/golang-build.scm: ... to here. * gnu/packages/disk.scm: Add (gnu packages golang-build) module. * gnu/packages/image-viewers.scm: As above. Change-Id: Ibdb637bb129437ef74a0270fd44edc8804bb3055 Sharlatan Hellseher 2023-12-29gnu: f3: Fix cross-compiling....* gnu/packages/disk.scm (f3) [arguments]: Use Gexp. Change-Id: I906a2b7b7691ae53592cfa35ba64fc7e7d735664 Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Zheng Junjie 2023-11-19gnu: nwipe: Update to 0.35....* gnu/packages/disk.scm (nwipe): Update to 0.35. [inputs]: Add libconfig. Change-Id: Ia4d704ffd58c3d4ea6d10e718808797b528438e0 Tobias Geerinckx-Rice 2023-11-22gnu: Add findimagedupes....* gnu/packages/disk.scm (findimagedupes): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Morgan Smith 2023-08-24gnu: hdparm: Move to (gnu packages disk)....* gnu/packages/linux.scm (hdparm): Move to... * gnu/packages/disk.scm (hdparm): ... here. Signed-off-by: Hilton Chain <hako@ultrarare.space> Felix Lechner 2023-08-06gnu: rmlint: Remove libelf....libelf provides libelf.so.0, elfutils libelf.so.1. rmlint links only to one. * gnu/packages/disk.scm (rmlint)[inputs]: Remove libelf. Tobias Geerinckx-Rice 2023-08-06gnu: rmlint: Update package style....* gnu/packages/disk.scm (rmlint)[arguments]: Rewrite as G-expressions. [native-inputs, inputs]: Remove input labels. Tobias Geerinckx-Rice 2023-08-06gnu: rmlint: Update to 2.10.2....* gnu/packages/disk.scm (rmlint): Update to 2.10.2. Tobias Geerinckx-Rice 2023-07-30gnu: ndctl: Update to 78....* gnu/packages/disk.scm (ndctl): Update to 78. [inputs]: Add libtraceevent & libtracefs. Tobias Geerinckx-Rice 2023-07-23gnu: parted: Update to 3.6....* gnu/packages/disk.scm (parted): Update to 3.6. Tobias Geerinckx-Rice 2023-07-21gnu: parted: Skip tests when cross-compiling....* gnu/packages/disk.scm (parted)[arguments]: Adjust #:tests? to skip tests when cross-compiling. Efraim Flashner 2023-07-20gnu: parted: Disable tests for the Hurd....* gnu/packages/disk.scm (parted)[argument]: Set #:tests? to #false when building for the Hurd. Janneke Nieuwenhuizen 2023-07-13gnu: parted: Support building for the Hurd....* gnu/packages/disk.scm (parted)[inputs]: Remove lvm2, add hurd-minimal when building for the Hurd. [arguments]: Add configure-flag '--disable-device-mapper' when building for the Hurd. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz> Janneke Nieuwenhuizen 2023-07-01gnu: Add greaseweazle-host-tools....* gnu/packages/disk.scm (greaseweazle-host-tools): New variable. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Rikard Nordgren 2023-06-21gnu: go-github-com-mattn-go-runewidth: Update to 0.0.14....* gnu/packages/golang.scm (go-github-com-mattn-go-runewidth): Update to 0.0.14. (go-github.com-mattn-go-runewidth): Remove, and change users to to refer to 'go-github-com-mattn-go-runewidth'. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Nguyễn Gia Phong 2023-06-14gnu: Add nwipe....* gnu/packages/disk.scm (nwipe): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Timotej Lazar