summaryrefslogtreecommitdiff
path: root/home-configuration.scm
blob: 7714c57f55b29212f905db7f887b03ff6a0893d5 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
(use-modules
 (gnu home services shells)
 (gnu packages)
 (gnu packages emacs)
 (gnu packages fonts)
 (gnu packages gnome)
 (gnu packages gnupg)
 (gnu packages noweb)
 (gnu packages version-control)
 (nongnu packages mozilla))

(use-modules
 (gnu)
 (gnu home services))

(use-package-modules emacs-xyz)

(use-service-modules)
(use-modules
 (gnu)
 (gnu home services)
 (guix build-system emacs)
 (guix git-download)
 ((guix licenses)
  #:prefix license:)
 (guix packages))

(use-package-modules base emacs-xyz gawk)
(use-modules
 (gnu services)
 (gnu home services)
 (gnu packages password-utils)
 (guix gexp))
(use-modules
 (gnu home services shells)
 (gnu services))

(home-environment
 (packages
  (list
   dconf-editor
   emacs
   emacs-org-modern
   emacs-paredit
   firefox
   font-google-noto
   font-google-noto-emoji
   font-google-noto-sans-cjk
   font-google-noto-serif-cjk
   git
   gnupg
   gnome-tweaks
   noweb
   pinentry
   pwgen
   tree-sitter))
 (services
  (append
   (list
    (simple-service
     'emacs-home-profile
     home-profile-service-type
     (append
      (list emacs-guix emacs-nix-mode)
      (list
       (let
           ((commit* "cfab3eb8e1c25640439f10789872e28872d656a0"))
         (package
          (name "emacs-org-fc")
          (version (git-version "0.1.0" "0" commit*))
          (source
           (origin
            (method git-fetch)
            (uri
             (git-reference
              (url "git://localhost/marek/org-fc")
              (commit commit*)))
            (file-name (git-file-name name version))
            (sha256 (base32 "0x8bxjh4r1wqh48f69x8k6gxfpixhwci365n0rh827csfjaqs5hg"))))
          (build-system emacs-build-system)
          (arguments
           (list
            #:include #~ (cons* "\\.awk$" "\\.org$" %default-include)
            #:exclude #~ (cons "^test/" %default-exclude)
            #:tests? #t
            #:test-command
            #~
            (list
             "emacs"
             "--batch"
             "-L" "."
             "-L" "tests/"
             "-l" "tests/org-fc-filter-test.el"
             "-l" "tests/org-fc-indexer-test.el"
             "-l" "tests/org-fc-review-data-test.el"
             "-f" "ert-run-tests-batch-and-exit")
            #:phases
            #~
            (modify-phases
             %standard-phases
             (add-after
              'unpack
              'qualify-paths
              (lambda*
                  (#:key inputs
                   #:allow-other-keys)
                (substitute*
                 "org-fc-awk.el"
                 (("\"find ")
                  (string-append
                   "\""
                   (search-input-file inputs "/bin/find")
                   " "))
                 (("\"gawk ")
                  (string-append
                   "\""
                   (search-input-file inputs "/bin/gawk")
                   " "))
                 (("\"xargs ")
                  (string-append
                   "\""
                   (search-input-file inputs "/bin/xargs")
                   " "))))))))
          (inputs (list findutils gawk))
          (propagated-inputs (list emacs-hydra))
          (home-page "https://www.leonrische.me/fc/index.html")
          (synopsis "Spaced repetition system for Emacs Org mode")
          (description
           (string-append
            "Org-fc is a spaced-repetition system for Emacs' Org mode.\n"
            "It allows you to mark headlines in a file as flashcards, turning pieces of\n"
            "knowledge you want to learn into a question-answer test.  These cards are\n"
            "reviewed at regular interval.  After each review, the next review interval is\n"
            "calculated based on how well you remembered the contents of the card.\n"))
          (license license:gpl3+))))))
    ( simple-service
      'home-files
      home-files-service-type
      ( list
        ( list ".emacs" ( local-file "home-files/emacs-configuration.el" ) )
        ( list ".config/guix/channels.scm" ( local-file "channels.scm" ) )
        ( list
          ".config/git/ignore"
          ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore
          ( local-file "home-files/git-ignore.conf" ) ) ) ))
   (list
    (let*
        ((and "&& ")
         (collect-garbage "sudo guix gc -d 7d ")
         (configuration-prefix "/home/marek/src/izumi/")
         (pull-guix "guix pull ")
         (reconfigure-home
          (string-append
           "git -C "
           configuration-prefix
           " pull --rebase=true "
           and
           "guix home reconfigure "
           configuration-prefix
           "home-configuration.scm "))
         (reconfigure-system
          (string-append
           "git -C "
           configuration-prefix
           " pull --rebase=true "
           and
           "sudo guix system reconfigure "
           configuration-prefix
           "system-configuration.scm "))
         (update-system
          (string-append
           pull-guix
           and
           reconfigure-system
           and
           reconfigure-home
           and
           collect-garbage)))
      (service
       home-bash-service-type
       (home-bash-configuration
        (aliases
         `(("collect-garbage" . ,collect-garbage)
           ("pull-guix" . ,pull-guix)
           ("reconfigure-home" . ,reconfigure-home)
           ("reconfigure-system" . ,reconfigure-system)
           ("update-system" . ,update-system))))))))))