summaryrefslogtreecommitdiffstats
path: root/.config/guix/machines/base-system.scm
blob: a294aca4b60a74dced53f9b39ec85d24d41d4e9a (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
(define-module (base-system)
  #:use-module (gnu)
  #:use-module (gnu system nss)
  #:use-module (gnu services pm)
  #:use-module (gnu services desktop)
  #:use-module (gnu services docker)
  #:use-module (gnu services networking)
  #:use-module (gnu services virtualization)
  #:use-module (gnu packages wm)
  #:use-module (gnu packages vim)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages emacs)
  #:use-module (gnu packages file-systems)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages audio)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages web-browsers)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages package-management))
                                        ;    #:use-module (nongnu packages linux)
                                        ;    #:use-module (nongnu system linux-initrd))

(use-service-modules ssh)
(use-package-modules certs)
(use-service-modules desktop xorg)

(define-public base-operating-system
  (operating-system
   (host-name "base")
   (timezone "Europe/Warsaw")
   (locale "en_US.utf8")

   ;; Use non-free Linux and firmware
   ;;     (kernel linux)
   ;;     (firmware (list linux-firmware))
   ;;     (initrd microcode-initrd)

   (bootloader (bootloader-configuration
                (bootloader grub-efi-bootloader)
                (targets "/boot/efi")))
   ;; (keyboard-layout keyboard-layout)))

   ;; Guix doesn't like it when there isn't a file-systems
   ;; entry, so add one that is meant to be overridden
   (file-systems (cons*
                  (file-system
                   (mount-point "/tmp")
                   (device "none")
                   (type "tmpfs")
                   (check? #f))
                  %base-file-systems))
   
   ;; Users
   (users (cons (user-account
                 (name "jakub")
                 (comment "Jakub Dlugosz")
                 (group "users")
                 (home-directory "/home/jakub")
                 (supplementary-groups '(
                                         "wheel" 
                                         "netdev" 
                                         "kvm"
                                         "tty"
                                         "input"
                                         "docker"
                                         "lp"
                                         "audio"
                                         "video")))
                %base-user-accounts))
   
   
   ;; Packages
   (packages (append (list
                      git
                      exfat-utils
                      fuse-exfat
                      stow
                      vim
                      emacs
                      bluez
                      bluez-alsa
                      pulseaudio
                      tlp
                      xf86-input-libinput
                      nss-certs) ;; For https connection
                     %base-packages))
   
   
   ;; Services
   (services
    (append
     (list
      (service elogind-service-type)
      (service openssh-service-type)
      (service network-manager-service-type)
      (service slim-service-type)
      (service tlp-service-type)
      (bluetooth-service #:auto-enable? #t)
      (service docker-service-type)
      (service wpa-supplicant-service-type))
     %base-services))
   
   ;; Allow resolution of '.local' host names with mDNS
   (name-service-switch %mdns-host-lookup-nss)))