Remove home management modules that are now in the guix-home-manager repo
modules/home.scm unknown status 2
1 | - | ;;; Tyreunom's system administration and configuration tools. | |
2 | - | ;;; | |
3 | - | ;;; Copyright ?? 2019 Julien Lepiller <julien@lepiller.eu> | |
4 | - | ;;; | |
5 | - | ;;; This program is free software: you can redistribute it and/or modify | |
6 | - | ;;; it under the terms of the GNU General Public License as published by | |
7 | - | ;;; the Free Software Foundation, either version 3 of the License, or | |
8 | - | ;;; (at your option) any later version. | |
9 | - | ;;; | |
10 | - | ;;; This program is distributed in the hope that it will be useful, | |
11 | - | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | - | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | - | ;;; GNU General Public License for more details. | |
14 | - | ;;; | |
15 | - | ;;; You should have received a copy of the GNU General Public License | |
16 | - | ;;; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | - | ||
18 | - | (define-module (home) | |
19 | - | #:use-module (guix build union) | |
20 | - | #:use-module (guix build utils) | |
21 | - | #:use-module (guix build-system trivial) | |
22 | - | #:use-module (guix gexp) | |
23 | - | #:use-module (guix licenses) | |
24 | - | #:use-module (guix packages) | |
25 | - | #:use-module (home build utils) | |
26 | - | #:export (home)) | |
27 | - | ||
28 | - | (define (home inputs) | |
29 | - | (define union | |
30 | - | (computed-file "home" | |
31 | - | #~(begin | |
32 | - | (use-modules (guix build union)) | |
33 | - | (union-build #$output '#$inputs)) | |
34 | - | #:options | |
35 | - | '(#:local-build? #t | |
36 | - | #:modules ((guix build union))))) | |
37 | - | (package | |
38 | - | (name "tyreunom-home") | |
39 | - | (version "0") | |
40 | - | (source #f) | |
41 | - | (build-system trivial-build-system) | |
42 | - | (arguments | |
43 | - | `(#:modules ((guix build utils) (home build utils)) | |
44 | - | #:builder | |
45 | - | (begin | |
46 | - | (use-modules (guix build utils) (home build utils)) | |
47 | - | (mkdir-p (home-file %outputs ".config")) | |
48 | - | ;; TODO: manage profiles, plugins, etc through guix. | |
49 | - | (symlink "/data/tyreunom/.mozilla" | |
50 | - | (home-file %outputs ".mozilla")) | |
51 | - | ;; For guix | |
52 | - | (symlink "/data/tyreunom/.config/guix" | |
53 | - | (home-file %outputs ".config/guix")) | |
54 | - | (symlink "/data/tyreunom/.guix-profile" | |
55 | - | (home-file %outputs ".guix-profile")) | |
56 | - | ;; symlink writeable directories | |
57 | - | (symlink "/data/tyreunom/.local" | |
58 | - | (home-file %outputs ".local")) | |
59 | - | (symlink "/data/tyreunom/.cache" | |
60 | - | (home-file %outputs ".cache")) | |
61 | - | ;; rest of the files | |
62 | - | (with-directory-excursion (assoc-ref %build-inputs "union") | |
63 | - | (for-each | |
64 | - | (lambda (f) | |
65 | - | (mkdir-p (home-file %outputs (dirname f))) | |
66 | - | (symlink (string-append (assoc-ref %build-inputs "union") "/" f) | |
67 | - | (home-file %outputs f))) | |
68 | - | (find-files "." ".*")))))) | |
69 | - | (inputs | |
70 | - | `(("union" ,union))) | |
71 | - | (home-page "") | |
72 | - | (synopsis "") | |
73 | - | (description "") | |
74 | - | (license gpl3+))) |
modules/home/build/utils.scm unknown status 2
1 | - | ;;; Tyreunom's system administration and configuration tools. | |
2 | - | ;;; | |
3 | - | ;;; Copyright ?? 2019 Julien Lepiller <julien@lepiller.eu> | |
4 | - | ;;; | |
5 | - | ;;; This program is free software: you can redistribute it and/or modify | |
6 | - | ;;; it under the terms of the GNU General Public License as published by | |
7 | - | ;;; the Free Software Foundation, either version 3 of the License, or | |
8 | - | ;;; (at your option) any later version. | |
9 | - | ;;; | |
10 | - | ;;; This program is distributed in the hope that it will be useful, | |
11 | - | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | - | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | - | ;;; GNU General Public License for more details. | |
14 | - | ;;; | |
15 | - | ;;; You should have received a copy of the GNU General Public License | |
16 | - | ;;; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | - | ||
18 | - | (define-module (home build utils) | |
19 | - | #:export (home-file)) | |
20 | - | ||
21 | - | (define (home-file outputs . path) | |
22 | - | (apply string-append (assoc-ref outputs "out") "/" path)) |
modules/home/openbox.scm unknown status 2
1 | - | ;;; Tyreunom's system administration and configuration tools. | |
2 | - | ;;; | |
3 | - | ;;; Copyright ?? 2019 Julien Lepiller <julien@lepiller.eu> | |
4 | - | ;;; | |
5 | - | ;;; This program is free software: you can redistribute it and/or modify | |
6 | - | ;;; it under the terms of the GNU General Public License as published by | |
7 | - | ;;; the Free Software Foundation, either version 3 of the License, or | |
8 | - | ;;; (at your option) any later version. | |
9 | - | ;;; | |
10 | - | ;;; This program is distributed in the hope that it will be useful, | |
11 | - | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | - | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | - | ;;; GNU General Public License for more details. | |
14 | - | ;;; | |
15 | - | ;;; You should have received a copy of the GNU General Public License | |
16 | - | ;;; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | - | ||
18 | - | (define-module (home openbox) | |
19 | - | #:use-module (guix build utils) | |
20 | - | #:use-module (guix build-system trivial) | |
21 | - | #:use-module (guix gexp) | |
22 | - | #:use-module (guix licenses) | |
23 | - | #:use-module (guix packages) | |
24 | - | #:use-module (guix records) | |
25 | - | #:use-module (gnu packages lxde) | |
26 | - | #:use-module (ice-9 match) | |
27 | - | #:export (openbox-configuration | |
28 | - | openbox-configuration? | |
29 | - | openbox-configuration-autostart | |
30 | - | openbox-configuration-environ | |
31 | - | openbox-configuration-menu | |
32 | - | openbox-configuration-rc | |
33 | - | ||
34 | - | openbox-menu | |
35 | - | openbox-menu-id | |
36 | - | openbox-menu-label | |
37 | - | opebnox-menu-elements | |
38 | - | ||
39 | - | openbox-element-menu | |
40 | - | openbox-element-execute | |
41 | - | ||
42 | - | openbox-home)) | |
43 | - | ||
44 | - | (define-record-type* <openbox-configuration> | |
45 | - | openbox-configuration make-openbox-configuration | |
46 | - | openbox-configuration? | |
47 | - | (autostart openbox-configuration-autostart | |
48 | - | (default #f)) | |
49 | - | (environ openbox-configuration-environ | |
50 | - | (default #f)) | |
51 | - | (menus openbox-configuration-menus | |
52 | - | (default '())) | |
53 | - | (root-elements openbox-configuration-root-elements | |
54 | - | (default '())) | |
55 | - | (rc openbox-configuration-rc | |
56 | - | (default #f))) | |
57 | - | ||
58 | - | (define-record-type* <openbox-menu> | |
59 | - | openbox-menu make-openbox-menu | |
60 | - | openbox-menu? | |
61 | - | (id openbox-menu-id) | |
62 | - | (label openbox-menu-label) | |
63 | - | (elements openbox-menu-elements)) | |
64 | - | ||
65 | - | (define-record-type* <openbox-element-menu> | |
66 | - | openbox-element-menu make-openbox-element-menu | |
67 | - | openbox-element-menu? | |
68 | - | (id openbox-element-menu-id)) | |
69 | - | ||
70 | - | (define-record-type* <openbox-element-execute> | |
71 | - | openbox-element-execute make-openbox-element-execute | |
72 | - | openbox-element-execute? | |
73 | - | (label openbox-element-execute-label) | |
74 | - | (command openbox-element-execute-command) | |
75 | - | (notify? openbox-element-execute-notify? | |
76 | - | (default #t))) | |
77 | - | ||
78 | - | (define (generate-openbox-menu menus root-menu) | |
79 | - | (define (element->item element) | |
80 | - | (match element | |
81 | - | (($ <openbox-element-menu> id) | |
82 | - | `(menu (@ (id ,id)))) | |
83 | - | (($ <openbox-element-execute> label command notify?) | |
84 | - | `(item (@ (label ,label)) | |
85 | - | (action (@ (name "Execute")) | |
86 | - | (command ,command) | |
87 | - | ,@(if notify? '(startupnotify (enabled "yes")) '())))))) | |
88 | - | #~(begin | |
89 | - | (use-modules (sxml simple)) | |
90 | - | (with-output-to-file #$output | |
91 | - | (lambda _ | |
92 | - | (sxml->xml | |
93 | - | `(openbox_menu (@ (xmlns "http://openbox.org/3.4/menu")) | |
94 | - | #$(map | |
95 | - | (lambda (menu) | |
96 | - | `(menu (@ (id ,(openbox-menu-id menu)) (label ,(openbox-menu-label menu))) | |
97 | - | ,(map element->item (openbox-menu-elements menu)))) | |
98 | - | menus) | |
99 | - | (menu (@ (id "root-menu") (label "Openbox 3")) | |
100 | - | #$(map element->item root-menu)))))))) | |
101 | - | ||
102 | - | (define (openbox-autostart autostart) | |
103 | - | (match autostart | |
104 | - | (#f (plain-file "autostart" "")) | |
105 | - | (_ autostart))) | |
106 | - | ||
107 | - | (define (openbox-environment environ) | |
108 | - | (match environ | |
109 | - | (#f (plain-file "environ" "")) | |
110 | - | (_ environ))) | |
111 | - | ||
112 | - | (define (openbox-rc rc) | |
113 | - | (match rc | |
114 | - | (#f (plain-file "rc.xml" "")) | |
115 | - | (_ rc))) | |
116 | - | ||
117 | - | (define (openbox-home config) | |
118 | - | (computed-file "openbox-home" | |
119 | - | (match config | |
120 | - | (($ <openbox-configuration> autostart environ menus root-elements rc) | |
121 | - | #~(let ((menu.xml #$(computed-file "menu.xml" (generate-openbox-menu menus root-elements))) | |
122 | - | (autostart #$(openbox-autostart autostart)) | |
123 | - | (environ #$(openbox-environment environ)) | |
124 | - | (rc #$(openbox-rc rc)) | |
125 | - | (openbox-dir (string-append #$output "/.config/openbox"))) | |
126 | - | (use-modules (guix build utils)) | |
127 | - | (mkdir-p openbox-dir) | |
128 | - | (copy-file autostart (string-append openbox-dir "/autostart")) | |
129 | - | (copy-file environ (string-append openbox-dir "/environment")) | |
130 | - | (copy-file menu.xml (string-append openbox-dir "/menu.xml")) | |
131 | - | (copy-file rc (string-append openbox-dir "/rc.xml"))))) | |
132 | - | #:options | |
133 | - | '(#:local-build? #t | |
134 | - | #:modules ((guix build utils))))) |
modules/home/utils.scm unknown status 2
1 | - | ;;; Tyreunom's system administration and configuration tools. | |
2 | - | ;;; | |
3 | - | ;;; Copyright ?? 2019 Julien Lepiller <julien@lepiller.eu> | |
4 | - | ;;; | |
5 | - | ;;; This program is free software: you can redistribute it and/or modify | |
6 | - | ;;; it under the terms of the GNU General Public License as published by | |
7 | - | ;;; the Free Software Foundation, either version 3 of the License, or | |
8 | - | ;;; (at your option) any later version. | |
9 | - | ;;; | |
10 | - | ;;; This program is distributed in the hope that it will be useful, | |
11 | - | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | - | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | - | ;;; GNU General Public License for more details. | |
14 | - | ;;; | |
15 | - | ;;; You should have received a copy of the GNU General Public License | |
16 | - | ;;; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | - | ||
18 | - | (define-module (home utils) | |
19 | - | #:use-module (guix build utils) | |
20 | - | #:use-module (guix gexp) | |
21 | - | #:export (simple-file-home)) | |
22 | - | ||
23 | - | (define (simple-file-home file-gexp location) | |
24 | - | (computed-file "simple-file-home" | |
25 | - | #~(begin | |
26 | - | (use-modules (guix build utils)) | |
27 | - | (mkdir-p (string-append #$output "/" #$(dirname location))) | |
28 | - | (copy-file #$file-gexp (string-append #$output "/" #$location))) | |
29 | - | #:options | |
30 | - | '(#:local-build? #t | |
31 | - | #:modules ((guix build utils))))) |