about summary refs log tree commit diff
path: root/guix/system.scm
blob: 5987e342b6afdb06336678bb683125328d0e2c2c (plain) (blame)
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
;; This is an operating system configuration generated
;; by the graphical installer.

(use-modules (gnu)
             (gnu packages glib)
             (gnu packages gtk)
             (gnu packages ibus)
             (gnu packages pkg-config)
             (gnu packages python)
             (gnu system setuid)
             (guix build-system gnu)
             (guix download)
             (guix licenses)
             (guix packages))
(use-service-modules avahi desktop dns networking nix sound ssh xorg)

(operating-system
  (locale "en_DK.utf8")
  (timezone "Asia/Seoul")
  (keyboard-layout (keyboard-layout "us" #:options '("ctrl:nocaps"
                                                     "compose:menu")))
  (host-name "guix")
  (users (cons* (user-account
                  (name "cnx")
                  (comment "McSinyx")
                  (group "users")
                  (home-directory "/home/cnx")
                  (supplementary-groups '("wheel" "netdev" "audio" "video")))
                %base-user-accounts))
  (packages
    (append
      (let* ((ibussy
              (package
                (inherit ibus)
                (native-search-paths
                 (map (lambda (spec)
                        (search-path-specification (variable (car spec))
                                                   (files (list (cdr spec)))))
                      '(("IBUS_COMPONENT_PATH" . "share/ibus/component")
                        ("IBUS_DATAROOTDIR" . "share")
                        ("IBUS_LIBEXECDIR" . "libexec")
                        ("IBUS_LOCALEDIR" . "share/locale")
                        ("IBUS_PREFIX" . "")
                        ("IBUS_TABLE_BIN_PATH" . "bin")
                        ("IBUS_TABLE_DATA_DIR" . "share")
                        ("IBUS_TABLE_LIB_LOCATION" . "libexec")
                        ("IBUS_TABLE_LOCATION" . "share/ibus-table"))))))
             (ibus-table
              (package
                (name "ibus-table")
                (version "1.17.1")
                (source
                  (origin
                    (method url-fetch)
                    (uri (string-append
                           "https://github.com/mike-fabian/ibus-table/releases/download/"
                           version "/ibus-table-" version ".tar.gz"))
                    (sha256
                      (base32 "063ba4fwk04lh0naj8z9r9x15ikckp94pd3f8xn40z3lnwsjx2sj"))))
                (build-system gnu-build-system)
                (arguments
                  (list #:phases
                        #~(modify-phases %standard-phases
                            (add-before 'check 'pre-check
                              (lambda _
                                (setenv "HOME" (getcwd)))))))  ; tests write to $HOME
                (native-inputs (list (list glib "bin")
                                     pkg-config))
                (inputs (list glib gtk+ ibussy python python-pygobject))
                (home-page "https://mike-fabian.github.io/ibus-table")
                (synopsis "Table based input framework for IBus")
                (description
                  "ibus-table is a framework for table based input methods using IBus.")
                (license lgpl2.1+)))
             (ibus-table-others
              (package
                (name "ibus-table-others")
                (version "1.3.16")
                (source
                  (origin
                    (method url-fetch)
                    (uri (string-append
                           "https://github.com/moebiuscurve/ibus-table-others/releases/"
                           "download/" version "/ibus-table-others-" version ".tar.gz"))
                    (sha256
                      (base32 "0vllwrjlgcvdjhs7nrg45hfvnivnfhrc05r6rhw8m0c41layl9jg"))))
                (build-system gnu-build-system)
                (arguments
                  (list #:phases
                        #~(modify-phases %standard-phases
                            (add-before 'build 'pre-build
                              (lambda _
                                (setenv "HOME" (getcwd)))))))  ; db written in $HOME
                (native-inputs (list pkg-config python))
                (inputs (list ibussy ibus-table))
                (home-page "https://github.com/moebiuscurve/ibus-table-others")
                (synopsis "Various table-based input methods for IBus")
                (description "Other tables")
                (license gpl3))))
             (list ibussy ibus-table ibus-table-others))
      (specifications->packages
        '("bash-completion" "curl" "dconf" "fd" "file" "htop"
          "ibus-libhangul" "nss-certs" "ranger"
          "ripgrep" "rsync" "udevil" "vim-full" "virt-manager"))
      %base-packages))
  (services
    (cons* (service openssh-service-type
                    (openssh-configuration
                      (password-authentication? #f)))
           (service xorg-server-service-type)
           (set-xorg-configuration
             (xorg-configuration
               (keyboard-layout keyboard-layout)))
           (screen-locker-service (specification->package "slock"))
           polkit-wheel-service
           (service nftables-service-type
                    (nftables-configuration
                      (ruleset (local-file "./nftables.conf"))))
           (service static-networking-service-type
                    (list (static-networking
                            (addresses
                              (list (network-address
                                      (device "enp5s0")
                                      (value "192.168.0.7/24"))))
                            (routes
                              (list (network-route
                                      (destination "default")
                                      (gateway "192.168.0.1"))))
                            (name-servers ; ns{4,5}.ca.us.dns.opennic.glue
                              '("147.182.243.49" "137.184.12.79")))))
           (service avahi-service-type)
           (udisks-service)
           (elogind-service)
           (service ntp-service-type)
           x11-socket-directory-service
           (service pulseaudio-service-type)
           (service alsa-service-type)
           (service nix-service-type)
           %base-services))
  (kernel-arguments (cons "modprobe.blacklist=pcspkr"
                          %default-kernel-arguments))
  (bootloader
    (bootloader-configuration
      (bootloader grub-efi-bootloader)
      (targets (list "/boot/efi"))
      (keyboard-layout keyboard-layout)))
  (swap-devices
    (list (swap-space (target (uuid "2e1d6b10-ef93-47f0-8eb0-b0ebf406e99b")))))
  (file-systems
    (cons* (file-system
             (mount-point "/")
             (device (uuid "f2cc88e7-55d3-4fce-9bc0-68a38c9671f5" 'btrfs))
             (type "btrfs"))
           (file-system
             (mount-point "/boot/efi")
             (device (uuid "09F6-ABE3" 'fat32))
             (type "vfat"))
           %base-file-systems)))