summaryrefslogtreecommitdiff
path: root/users/id1000.scm
blob: 1f173cf19f879d417113d9f2184b09eae4ae6381 (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
(define-module (users id1000)
  ;; home-environment
  #:use-module (gnu home)

  ;; home-profile-service-type
  ;; home-xdg-configuration-files-service-type
  #:use-module (gnu home services)

  ;; gparted
  #:use-module (gnu packages disk)

  ;; emacs
  #:use-module (gnu packages emacs)

  ;; emacs-org-roam
  ;; emacs-paredit
  #:use-module (gnu packages emacs-xyz)

  ;; git
  #:use-module (gnu packages version-control)

  ;; simple-service
  #:use-module (gnu services)

  ;; user-account
  #:use-module (gnu system shadow)

  ;; local-file
  #:use-module (guix gexp)

  ;; %suweren-home-services
  #:use-module (suweren home))

;; (list string)
(define groups
  (list "kvm"
	"wheel"))

;; string
(define-public uid1000-name
  "marek")

;; record* user-account
(define-public uid1000-account
  (user-account (name uid1000-name)
		(group "users")
		(supplementary-groups groups)
		(uid 1000)
		(comment "Marek Paśnikowski")
		(home-directory "/home/marek")))

;; record home-environment
(define-public uid1000-home-environment
  (lambda (host-name*)
    (let* ((gitconfig-file (local-file "uid1000-gitconfig")) ; TODO modularize
	   (gitignore-file (local-file "uid1000-gitignore")) ; TODO review the contents

	   (gitconfig (list "git/config"
			    gitconfig-file))
	   (gitignore (list "git/ignore"
			    gitignore-file))

	   (emacs-packages (list emacs
				 emacs-org-roam
				 emacs-paredit))
	   (git-configuration-files (list gitconfig
					  gitignore))
	   (git-packages (list git))
	   (packages (list gparted))

	   (emacs-software (simple-service 'emacs-packages
					   home-profile-service-type
					   emacs-packages))
	   (git-configuration (simple-service 'git-configuration
					      home-xdg-configuration-files-service-type
					      git-configuration-files))
	   (git-software (simple-service 'git-packages
					 home-profile-service-type
					 git-packages))
	   (profile (simple-service 'user-packages
				    home-profile-service-type
				    packages))

	   (%suweren-home-services* (%suweren-home-services host-name*))
	   (user-services (list emacs-software
				git-configuration
				git-software
				profile))

	   (services* (append %suweren-home-services*
			      user-services)))
      (home-environment (services services*)))))