[254aa1d] | 1 | (use-modules (gnu)
|
---|
| 2 | (guix transformations)
|
---|
| 3 | (gnu home)
|
---|
| 4 | (guix gexp)
|
---|
| 5 | (nongnu packages linux)
|
---|
| 6 | (nongnu system linux-initrd)
|
---|
| 7 | (gnu home services shells))
|
---|
| 8 |
|
---|
[5211578] | 9 | (use-service-modules guix cups desktop networking ssh xorg docker nix admin vnc lightdm syncthing virtualization databases linux web backup telephony file-sharing)
|
---|
[254aa1d] | 10 | (use-package-modules gnome xdisorg vnc databases)
|
---|
| 11 |
|
---|
| 12 | (load "/home/w96k/projects/dotfiles/guix/.dotfiles/home-configuration.scm")
|
---|
| 13 |
|
---|
| 14 | (define wkz-transform
|
---|
| 15 | ;; The package transformation procedure.
|
---|
| 16 | (options->transformation
|
---|
| 17 | '((tune . "skylake"))))
|
---|
| 18 |
|
---|
| 19 | (operating-system
|
---|
| 20 | (locale "en_US.utf8")
|
---|
| 21 | (timezone "Asia/Tbilisi")
|
---|
| 22 | (kernel linux)
|
---|
[5211578] | 23 | (kernel-arguments '("video=HDMI-A-1:1920x1080@240"))
|
---|
[254aa1d] | 24 | (initrd microcode-initrd)
|
---|
| 25 | (firmware (list linux-firmware))
|
---|
| 26 | (keyboard-layout (keyboard-layout "us,ru"
|
---|
| 27 | #:options '("grp:shifts_toggle" "ctrl:nocaps")))
|
---|
| 28 | (host-name "wkz-guix")
|
---|
| 29 |
|
---|
| 30 | ;; The list of user accounts ('root' is implicit).
|
---|
| 31 | (users (cons* (user-account
|
---|
| 32 | (name "w96k")
|
---|
| 33 | (comment "W96K")
|
---|
| 34 | (group "users")
|
---|
| 35 | (home-directory "/home/w96k")
|
---|
[ead573e] | 36 | (supplementary-groups '("wheel" "netdev" "audio" "video" "kvm" "httpd")))
|
---|
[254aa1d] | 37 | %base-user-accounts))
|
---|
| 38 |
|
---|
| 39 | ;; (packages %base-packages)
|
---|
| 40 | (packages
|
---|
| 41 | (append
|
---|
| 42 | (map
|
---|
| 43 | specification->package
|
---|
| 44 | '(
|
---|
[5211578] | 45 | "font-gnu-freefont" "font-gnu-unifont"
|
---|
[254aa1d] | 46 | ))
|
---|
| 47 | %base-packages))
|
---|
| 48 |
|
---|
| 49 | ;; Below is the list of system services. To search for available
|
---|
| 50 | ;; services, run 'guix system search KEYWORD' in a terminal.
|
---|
| 51 | (services
|
---|
| 52 | (append (list
|
---|
[5211578] | 53 | (service guix-home-service-type `(("w96k" ,wkz-home)))
|
---|
[254aa1d] | 54 | (service block-facebook-hosts-service-type)
|
---|
| 55 |
|
---|
[fc6fa17] | 56 | (service zram-device-service-type
|
---|
| 57 | (zram-device-configuration
|
---|
| 58 | (compression-algorithm 'zlib)
|
---|
| 59 | (priority 100)))
|
---|
| 60 |
|
---|
[5211578] | 61 | (service tor-service-type
|
---|
| 62 | (tor-configuration
|
---|
| 63 | (config-file (plain-file "tor-config"
|
---|
| 64 | "HTTPTunnelPort 127.0.0.1:9250"))))
|
---|
[254aa1d] | 65 | (service openssh-service-type)
|
---|
[5211578] | 66 |
|
---|
| 67 | (service transmission-daemon-service-type)
|
---|
| 68 |
|
---|
| 69 | ;; (service containerd-service-type)
|
---|
| 70 | ;; (service docker-service-type)
|
---|
| 71 | ;; (service restic-backup-service-type)
|
---|
| 72 |
|
---|
[254aa1d] | 73 | ;; (service hurd-vm-service-type
|
---|
| 74 | ;; (hurd-vm-configuration
|
---|
| 75 | ;; (disk-size (* 5000 (expt 2 20))) ;5G
|
---|
| 76 | ;; (memory-size 1024)))
|
---|
| 77 |
|
---|
[fc6fa17] | 78 | ;; (service nix-service-type)
|
---|
[254aa1d] | 79 |
|
---|
[fc6fa17] | 80 | ;; (service xvnc-service-type (xvnc-configuration
|
---|
| 81 | ;; (display-number 10)
|
---|
| 82 | ;; (localhost? #f)
|
---|
| 83 | ;; (geometry "1280x800")))
|
---|
[254aa1d] | 84 |
|
---|
[5211578] | 85 | ;; (service syncthing-service-type
|
---|
| 86 | ;; (syncthing-configuration
|
---|
| 87 | ;; (user "w96k")))
|
---|
| 88 |
|
---|
| 89 | ;; (service postgresql-service-type
|
---|
| 90 | ;; (postgresql-configuration
|
---|
| 91 | ;; (postgresql postgresql-15)))
|
---|
| 92 |
|
---|
| 93 | (service dhcp-client-service-type)
|
---|
| 94 |
|
---|
| 95 | (service httpd-service-type
|
---|
| 96 | (httpd-configuration
|
---|
| 97 | (config
|
---|
| 98 | (httpd-config-file
|
---|
| 99 | (modules (cons*
|
---|
| 100 | (httpd-module
|
---|
| 101 | (name "proxy_module")
|
---|
| 102 | (file "modules/mod_proxy.so"))
|
---|
| 103 | (httpd-module
|
---|
| 104 | (name "proxy_fcgi_module")
|
---|
| 105 | (file "modules/mod_proxy_fcgi.so"))
|
---|
| 106 | %default-httpd-modules))
|
---|
| 107 | (extra-config (list "\
|
---|
| 108 | <FilesMatch \\.php$>
|
---|
| 109 | SetHandler \"proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/\"
|
---|
| 110 | </FilesMatch>"))))))
|
---|
| 111 | (service php-fpm-service-type
|
---|
| 112 | (php-fpm-configuration
|
---|
[ead573e] | 113 | (display-errors #t)
|
---|
[5211578] | 114 | (socket "/var/run/php-fpm.sock")
|
---|
| 115 | (socket-group "httpd")))
|
---|
[254aa1d] | 116 |
|
---|
| 117 | ;; (service screen-locker-service-type
|
---|
| 118 | ;; (screen-locker-configuration
|
---|
| 119 | ;; (name "xlock")
|
---|
| 120 | ;; (program (file-append xlockmore "/bin/xlock"))))
|
---|
| 121 | )
|
---|
| 122 |
|
---|
| 123 | (modify-services %desktop-services
|
---|
| 124 | (delete screen-locker-service-type)
|
---|
| 125 | (delete modem-manager-service-type)
|
---|
[5211578] | 126 | ;; (delete udisks-service-type)
|
---|
[254aa1d] | 127 | (delete upower-service-type)
|
---|
| 128 | (delete network-manager-service-type)
|
---|
[5211578] | 129 | (delete wpa-supplicant-service-type)
|
---|
| 130 | ;; (delete usb-modeswitch-service-type)
|
---|
[254aa1d] | 131 | (delete geoclue-service-type)
|
---|
[fc6fa17] | 132 | ;;(delete elogind-service-type)
|
---|
| 133 | (delete colord-service-type)
|
---|
[5211578] | 134 | (delete ntp-service-type)
|
---|
[254aa1d] | 135 |
|
---|
| 136 |
|
---|
| 137 | (guix-service-type config => (guix-configuration
|
---|
| 138 | (inherit config)
|
---|
[fc6fa17] | 139 | ;; Rely on btrfs compression.
|
---|
| 140 | (log-compression 'none)
|
---|
[254aa1d] | 141 | (extra-options '("--max-jobs=10"))
|
---|
| 142 | (substitute-urls
|
---|
[5211578] | 143 | (list
|
---|
| 144 | "https://4zwzi66wwdaalbhgnix55ea3ab4pvvw66ll2ow53kjub6se4q2bclcyd.onion"
|
---|
| 145 | "https://substitutes.nonguix.org"))
|
---|
| 146 | (http-proxy "http://localhost:9250")
|
---|
[254aa1d] | 147 | (authorized-keys
|
---|
| 148 | (append (list (plain-file "non-guix.pub"
|
---|
| 149 | "
|
---|
| 150 | (public-key
|
---|
| 151 | (ecc
|
---|
| 152 | (curve Ed25519)
|
---|
| 153 | (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
|
---|
| 154 | )
|
---|
| 155 | )
|
---|
| 156 | "))
|
---|
| 157 | %default-authorized-guix-keys))))
|
---|
| 158 |
|
---|
| 159 | (delete gdm-service-type))))
|
---|
| 160 |
|
---|
[fc6fa17] | 161 | (mapped-devices (list (mapped-device
|
---|
| 162 | (source (uuid
|
---|
| 163 | "03db8d78-051b-4a11-a7e5-b62ae0f530d4"))
|
---|
| 164 | (target "cryptroot")
|
---|
| 165 | (type luks-device-mapping))))
|
---|
| 166 |
|
---|
| 167 | ;; The list of file systems that get "mounted". The unique
|
---|
| 168 | ;; file system identifiers there ("UUIDs") can be obtained
|
---|
| 169 | ;; by running 'blkid' in a terminal.
|
---|
| 170 | (file-systems (cons* (file-system
|
---|
| 171 | (mount-point "/")
|
---|
| 172 | (device "/dev/mapper/cryptroot")
|
---|
| 173 | (type "btrfs")
|
---|
[5211578] | 174 | (options "compress=zlib:9,autodefrag")
|
---|
| 175 | (dependencies mapped-devices))
|
---|
| 176 | (file-system
|
---|
| 177 | (mount-point "/home/w96k/")
|
---|
| 178 | (device "/dev/mapper/cryptroot")
|
---|
| 179 | (type "btrfs")
|
---|
| 180 | (options "compress=zlib:7,autodefrag,subvol=/home/w96k/")
|
---|
| 181 | (dependencies mapped-devices))
|
---|
| 182 | (file-system
|
---|
| 183 | (mount-point "/home/w96k/Snapshots/")
|
---|
| 184 | (device "/dev/mapper/cryptroot")
|
---|
| 185 | (type "btrfs")
|
---|
| 186 | (options "compress=zlib:9,autodefrag,subvol=/home/w96k/Snapshots")
|
---|
[fc6fa17] | 187 | (dependencies mapped-devices))
|
---|
| 188 | (file-system
|
---|
| 189 | (mount-point "/boot/efi")
|
---|
| 190 | (device (uuid "6ECD-551F"
|
---|
| 191 | 'fat32))
|
---|
| 192 | (type "vfat")) %base-file-systems))
|
---|
| 193 |
|
---|
[254aa1d] | 194 | (bootloader (bootloader-configuration
|
---|
| 195 | (bootloader grub-efi-bootloader)
|
---|
| 196 | (targets (list "/boot/efi"))
|
---|
[fc6fa17] | 197 | (keyboard-layout keyboard-layout))))
|
---|