diff options
Diffstat (limited to '')
-rw-r--r-- | modules/freya/services/cow.scm | 62 | ||||
-rw-r--r-- | modules/freya/services/pipewire.scm | 101 |
2 files changed, 0 insertions, 163 deletions
diff --git a/modules/freya/services/cow.scm b/modules/freya/services/cow.scm deleted file mode 100644 index e233db7..0000000 --- a/modules/freya/services/cow.scm +++ /dev/null @@ -1,62 +0,0 @@ -(define-module (freya services cow) - #:use-module (gnu services shepherd) - #:use-module (guix modules) - #:use-module (gnu)) - -; guix doesnt export the cow store -; bruch >:( - -(define %backing-directory - ;; Sub-directory used as the backing store for copy-on-write. - "/tmp/guix-inst") - -(define cow-store-service-type - (shepherd-service-type - 'cow-store - (lambda _ - (define (import-module? module) - ;; Since we don't use deduplication support in 'populate-store', don't - ;; import (guix store deduplication) and its dependencies, which - ;; includes Guile-Gcrypt. - (and (guix-module-name? module) - (not (equal? module '(guix store deduplication))))) - - (shepherd-service - (requirement '(root-file-system user-processes)) - (provision '(cow-store)) - (documentation - "Make the store copy-on-write, with writes going to \ -the given target.") - - ;; This is meant to be explicitly started by the user. - (auto-start? #f) - - (modules `((gnu build install) - ,@%default-modules)) - (start - (with-imported-modules (source-module-closure - '((gnu build install)) - #:select? import-module?) - #~(case-lambda - ((target) - (mount-cow-store target #$%backing-directory) - target) - (else - ;; Do nothing, and mark the service as stopped. - #f)))) - (stop #~(lambda (target) - ;; Delete the temporary directory, but leave everything - ;; mounted as there may still be processes using it since - ;; 'user-processes' doesn't depend on us. The 'user-file-systems' - ;; service will unmount TARGET eventually. - (delete-file-recursively - (string-append target #$%backing-directory)))))) - (description "Make the store copy-on-write, with writes going to \ -the given target."))) - -(define-public (cow-store-service) - "Return a service that makes the store copy-on-write, such that writes go to -the user's target storage device rather than on the RAM disk." - ;; See <http://bugs.gnu.org/18061> for the initial report. - (service cow-store-service-type 'mooooh!)) - diff --git a/modules/freya/services/pipewire.scm b/modules/freya/services/pipewire.scm deleted file mode 100644 index adc5963..0000000 --- a/modules/freya/services/pipewire.scm +++ /dev/null @@ -1,101 +0,0 @@ -(define-module (freya services pipewire) - #:use-module (gnu packages) - #:use-module (gnu packages linux) - #:use-module (gnu services) - #:use-module (gnu services configuration) - #:use-module (gnu home services) - #:use-module (gnu home services shepherd) - #:use-module (freya packages linux) - #:use-module (freya packages networking) - #:use-module (guix gexp)) - -(define (home-pipewire-profile-service config) - (list pipewire-new - wireplumber-new)) - - -(define (home-pipewire-shepherd-service config) - (list - ;; Pipewire daemon - (shepherd-service - (requirement '(dbus)) - (provision '(pipewire)) - (stop #~(make-kill-destructor)) - (start #~(make-forkexec-constructor - (list #$(file-append pipewire-new "/bin/pipewire")) - #:log-file (string-append - (or (getenv "XDG_LOG_HOME") - (format #f "~a/.local/var/log" - (getenv "HOME"))) - "/pipewire.log") - #:environment-variables - (append (list "DISABLE_RTKIT=0") - (default-environment-variables))))) - ;; Pipewire-pulse - (shepherd-service - (requirement '(pipewire)) - (provision '(pipewire-pulse)) - (stop #~(make-kill-destructor)) - (start #~(make-forkexec-constructor - (list #$(file-append pipewire-new "/bin/pipewire-pulse")) - #:log-file (string-append - (or (getenv "XDG_LOG_HOME") - (format #f "~a/.local/var/log" - (getenv "HOME"))) - "/pipewire-pulse.log") - #:environment-variables - (append (list "DISABLE_RTKIT=0") - (default-environment-variables))))) - ;; Wireplumber - (shepherd-service - (requirement '(pipewire)) - (provision '(wireplumber)) - (stop #~(make-kill-destructor)) - (start #~(make-forkexec-constructor - (list #$(file-append wireplumber-new "/bin/wireplumber")) - #:log-file (string-append - (or (getenv "XDG_LOG_HOME") - (format #f "~a/.local/var/log" - (getenv "HOME"))) - "/wireplumber.log") - #:environment-variables - (append (list "DISABLE_RTKIT=0") - (default-environment-variables))))))) - -(define (home-pipewire-xdg-configuration-service config) - `(("alsa/asoundrc" - ,(mixed-text-file - "asoundrc" - #~(string-append - "<" - #$(file-append - pipewire-new "/share/alsa/alsa.conf.d/50-pipewire.conf") - ">\n<" - #$(file-append - pipewire-new "/share/alsa/alsa.conf.d/99-pipewire-default.conf") - ">\n" - " - pcm_type.pipewire { - lib " #$(file-append pipewire-new "/lib/alsa-lib/libasound_module_pcm_pipewire.so") - " - } - ctl_type.pipewire { - lib " #$(file-append pipewire-new "/lib/alsa-lib/libasound_module_ctl_pipewire.so") - " - } - "))))) - -(define-public home-pipewire-service-type - (service-type (name 'home-pipewire) - (extensions - (list (service-extension - home-profile-service-type - home-pipewire-profile-service) - (service-extension - home-shepherd-service-type - home-pipewire-shepherd-service) - (service-extension - home-xdg-configuration-files-service-type - home-pipewire-xdg-configuration-service))) - (default-value #f) - (description "Configures and runs Pipewire and Wireplumber"))) |