;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2024 Ludovic Courtès ;;; Copyright © 2024 Giacomo Leidi ;;; ;;; 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 . (define-module (gnu home services dotfiles) #:use-module (gnu home services) #:use-module (gnu services) #:use-module (gnu services configuration) #:autoload (guix build utils) (find-files) #:use-module (guix diagnostics) #:use-module (guix gexp) #:use-module
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/xorg.scm')
0 files changed, 0 insertions, 0 deletions
? (eq? (home-dotfiles-configuration-layout config) 'stow)) (define excluded (home-dotfiles-configuration-excluded config)) (define exclusion-rx (make-regexp (string-append "^.*(" (string-join excluded "|") ")$"))) (define* (directory-contents directory #:key (packages #f)) (define (filter-files directory) (find-files directory (lambda (file stat) (not (regexp-exec exclusion-rx (basename file)))))) (if (and stow? packages (maybe-value-set? packages)) (append-map filter-files (map (lambda (pkg) (string-append directory "/" pkg)) packages)) (filter-files directory))) (define (resolve directory) ;; Resolve DIRECTORY relative to the 'source-directory' field of CONFIG. (if (string-prefix? "/" directory) directory (in-vicinity (home-dotfiles-configuration-source-directory config) directory))) (append-map (lambda (directory) (let* ((directory (resolve directory)) (packages (home-dotfiles-configuration-packages config)) (contents (directory-contents directory #:packages packages)) (strip (if stow? strip-stow-dotfile strip-plain-dotfile))) (import-dotfiles directory contents strip))) (home-dotfiles-configuration-directories config))) (define-public home-dotfiles-service-type (service-type (name 'home-dotfiles) (extensions (list (service-extension home-files-service-type (lambda (config) (when config (home-dotfiles-configuration->files config)))))) (default-value (home-dotfiles-configuration)) (description "Files that will be put in the user's home directory following GNU Stow's algorithm, and further processed during activation.")))