From fc26b38cbb413ae21da98ee6cb5445cb99ac1f78 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Wed, 9 Aug 2023 09:00:48 +0800 Subject: [PATCH] Revert "Import seatd-service-type from Guix." This reverts commit 2bc27145b3c73495e3b61d41015e3f77510f49f4. Guix has switched to cgroup v2 in 969cea683615e79c7e6548f945f15af80ad58a8a. --- rosenthal/services/desktop.scm | 87 ---------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 rosenthal/services/desktop.scm diff --git a/rosenthal/services/desktop.scm b/rosenthal/services/desktop.scm deleted file mode 100644 index edaab6f..0000000 --- a/rosenthal/services/desktop.scm +++ /dev/null @@ -1,87 +0,0 @@ -;; SPDX-FileCopyrightText: 2014-2022 Ludovic Courtès -;; SPDX-FileCopyrightText: 2015 Andy Wingo -;; SPDX-FileCopyrightText: 2015 Mark H Weaver -;; SPDX-FileCopyrightText: 2016 Sou Bunnbu -;; SPDX-FileCopyrightText: 2017, 2020, 2022 Maxim Cournoyer -;; SPDX-FileCopyrightText: 2017 Nikita -;; SPDX-FileCopyrightText: 2018, 2020 Efraim Flashner -;; SPDX-FileCopyrightText: 2018 Ricardo Wurmus -;; SPDX-FileCopyrightText: 2017, 2019 Christopher Baines -;; SPDX-FileCopyrightText: 2019 Tim Gesthuizen -;; SPDX-FileCopyrightText: 2019 David Wilson -;; SPDX-FileCopyrightText: 2020 Tobias Geerinckx-Rice -;; SPDX-FileCopyrightText: 2020 Reza Alizadeh Majd -;; SPDX-FileCopyrightText: 2021 Brice Waegeneire -;; SPDX-FileCopyrightText: 2021, 2022 muradm -;; -;; SPDX-License-Identifier: GPL-3.0-or-later - -(define-module (rosenthal services desktop) - #:use-module (gnu packages admin) - #:use-module (gnu services) - #:use-module (gnu services shepherd) - #:use-module (gnu system pam) - #:use-module (gnu system shadow) - #:use-module (guix gexp) - #:use-module (guix records) - #:use-module (ice-9 match) - #:export (seatd-configuration - seatd-service-type)) - -;;; -;;; seatd-service-type -- minimal seat management daemon -;;; - -(define (seatd-group-sanitizer group-or-name) - (match group-or-name - ((? user-group? group) group) - ((? string? group-name) (user-group (name group-name) (system? #t))) - (_ (leave (G_ "seatd: '~a' is not a valid group~%") group-or-name)))) - -(define-record-type* seatd-configuration - make-seatd-configuration - seatd-configuration? - (seatd seatd-package (default seatd)) - (group seatd-group ; string | - (default "seat") - (sanitize seatd-group-sanitizer)) - (socket seatd-socket (default "/run/seatd.sock")) - (logfile seatd-logfile (default "/var/log/seatd.log")) - (loglevel seatd-loglevel (default "info"))) - -(define (seatd-shepherd-service config) - (list (shepherd-service - (documentation "Minimal seat management daemon") - (requirement '()) - (provision '(seatd)) - (start #~(make-forkexec-constructor - (list #$(file-append (seatd-package config) "/bin/seatd") - "-g" #$(user-group-name (seatd-group config))) - #:environment-variables - (list (string-append "SEATD_LOGLEVEL=" - #$(seatd-loglevel config)) - (string-append "SEATD_DEFAULTPATH=" - #$(seatd-socket config))) - #:log-file #$(seatd-logfile config))) - (stop #~(make-kill-destructor))))) - -(define seatd-accounts - (match-lambda (($ _ group) (list group)))) - -(define seatd-environment - (match-lambda - (($ _ _ socket) - `(("SEATD_SOCK" . ,socket))))) - -(define seatd-service-type - (service-type - (name 'seatd) - (description "Seat management takes care of mediating access -to shared devices (graphics, input), without requiring the -applications needing access to be root.") - (extensions - (list - (service-extension account-service-type seatd-accounts) - (service-extension session-environment-service-type seatd-environment) - (service-extension shepherd-root-service-type seatd-shepherd-service))) - (default-value (seatd-configuration))))