├── .gitignore ├── 3900XT.scm ├── COPYING ├── E5400_config.scm ├── Extras ├── 3900XT_publish.pub ├── E5400_publish.pub ├── X1.pub ├── bordeaux.guix.gnu.org.pub ├── ci.guix.gnu.org.pub ├── cuirass.genenetwork.org.pub ├── efraim.pub ├── g4_publish.pub ├── guix.bordeaux.inria.fr.pub ├── guix.genenetwork.org.pub ├── guix.tobias.gr.pub ├── macbook41.config ├── pbp-asound.state ├── penguin2.pub ├── pine64_publish.pub ├── pinebookpro_publish.pub ├── rock64-1.pub ├── rpi5b.pub ├── starfive-vision1.pub ├── starfive-vision2.pub └── unmatched_publish.pub ├── Guix_manifest.scm ├── X1.scm ├── aarch64-deploy.scm ├── alacritty.toml ├── config ├── filesystems.scm ├── guix-daemon.scm └── xorg-modules.scm ├── efraim-home.scm ├── gparted.scm ├── i3status-config ├── kids_manifest.scm ├── lemote.scm ├── novena.scm ├── pine64-deploy.scm ├── pine64.scm ├── pinebookpro.scm ├── rock64-deploy.scm ├── rock64.scm ├── sway-config ├── tofi-config ├── unmatched-deploy.scm ├── unmatched.scm ├── vim ├── after │ └── ftplugin │ │ ├── gitcommit.vim │ │ ├── guix.vim │ │ ├── mail.vim │ │ ├── scheme.vim │ │ └── text.vim ├── spell │ ├── en.utf-8.add │ ├── en.utf-8.add.spl │ └── he.utf-8.add └── vimrc ├── visionfive1.scm ├── visionfive2.scm └── vm_config.scm /.gitignore: -------------------------------------------------------------------------------- 1 | *.go 2 | vim/.netrwhist 3 | -------------------------------------------------------------------------------- /3900XT.scm: -------------------------------------------------------------------------------- 1 | (define-module (3900XT)) 2 | (use-modules 3 | (gnu) 4 | (gnu system locale) 5 | (guix transformations) 6 | (config filesystems) 7 | (config guix-daemon) 8 | (dfsg contrib services tailscale) 9 | (srfi srfi-1)) 10 | (use-service-modules 11 | cups 12 | dns 13 | desktop 14 | linux 15 | mcron 16 | networking 17 | sddm 18 | ssh 19 | virtualization 20 | xorg) 21 | (use-package-modules 22 | cups) 23 | 24 | (define with-transformations 25 | (options->transformation 26 | `((tune . "znver2")))) 27 | 28 | (define (S pkg) 29 | (with-transformations (specification->package pkg))) 30 | 31 | (define %sway-keyboard-function-keys 32 | (mixed-text-file 33 | "keyboard-function-keys" 34 | ;; bindsym XF86Tools 35 | "bindsym XF86AudioLowerVolume exec " (S "pulseaudio") "/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%\n" 36 | "bindsym XF86AudioRaiseVolume exec " (S "pulseaudio") "/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%\n" 37 | "bindsym XF86AudioMute exec " (S "pulseaudio") "/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle\n" 38 | ;; bindsym XF86AudioPrev 39 | ;; bindsym XF86AudioNext 40 | ;; bindsym XF86AudioPlay 41 | ;; bindsym XF86AudioStop 42 | ;; bindsym XF86HomePage 43 | ;; bindsym XF86Mail 44 | ;; bindsym XF86Explorer 45 | ;; bindsym XF86Favorites 46 | )) 47 | 48 | (operating-system 49 | (host-name "3900XT") 50 | (timezone "Asia/Jerusalem") 51 | (locale "en_IL.utf8") 52 | (locale-definitions 53 | (list (locale-definition (source "en_US") 54 | (name "en_US.UTF-8")) 55 | (locale-definition (source "he_IL") 56 | (name "he_IL.UTF-8")))) 57 | (keyboard-layout 58 | (keyboard-layout "us" "altgr-intl")) 59 | 60 | (bootloader 61 | (bootloader-configuration 62 | (bootloader grub-efi-bootloader) 63 | (targets '("/boot/efi")) 64 | (keyboard-layout keyboard-layout))) 65 | 66 | (file-systems 67 | (cons* (file-system 68 | (mount-point "/") 69 | (device 70 | (uuid "20048579-a0bd-4180-8ea3-4b546309fb3b" 71 | 'btrfs)) 72 | (type "btrfs") 73 | (options "compress=zstd,discard,space_cache=v2")) 74 | (file-system 75 | (mount-point "/boot/efi") 76 | (device (uuid "9146-2C77" 'fat32)) 77 | (type "vfat")) 78 | %tmp-tmpfs 79 | %guix-temproots 80 | %base-file-systems)) 81 | 82 | (users (cons* (user-account 83 | (name "efraim") 84 | (comment "Efraim Flashner") 85 | (group "users") 86 | (home-directory "/home/efraim") 87 | (supplementary-groups 88 | '("wheel" "netdev" "kvm" 89 | "lp" "lpadmin" 90 | "libvirt" 91 | ;"plugdev" 92 | "audio" "video"))) 93 | %base-user-accounts)) 94 | (packages 95 | (map with-transformations 96 | (append 97 | (map specification->package 98 | (list "adwaita-icon-theme" 99 | "compsize" 100 | "git-minimal" ; git-upload-pack 101 | "guix-backgrounds" 102 | "guix-simplyblack-sddm-theme" ; sddm theme 103 | "virt-manager" 104 | "xterm" 105 | 106 | "sway" 107 | "swayidle" 108 | "swaylock" 109 | 110 | "dunst" 111 | "i3status" 112 | "tofi")) 113 | %base-packages))) 114 | 115 | (services 116 | (cons* (service screen-locker-service-type 117 | (screen-locker-configuration 118 | (name "swaylock") 119 | (program (file-append (S "swaylock") 120 | "/bin/swaylock")) 121 | (allow-empty-password? #f) 122 | (using-pam? #t) 123 | (using-setuid? #f))) 124 | 125 | (service guix-publish-service-type 126 | (guix-publish-configuration 127 | (host "0.0.0.0") 128 | (port 3000) 129 | (advertise? #t))) 130 | 131 | (simple-service 'sway-kbd-fn-keys etc-service-type 132 | `(("sway/config.d/function-keys" 133 | ,%sway-keyboard-function-keys))) 134 | 135 | (extra-special-file 136 | "/usr/share/zoneinfo/tzdata.zi" 137 | (file-append (S "tzdata") "/share/zoneinfo/tzdata.zi")) 138 | 139 | (service openssh-service-type 140 | (openssh-configuration 141 | (password-authentication? #t))) 142 | ;; guix system: error: symlink: File exists: "/etc/ssh" 143 | ;(simple-service 'ssh-known-hosts etc-service-type 144 | ; `(("ssh/ssh-known-hosts" ,(local-file "Extras/ssh-known-hosts")))) 145 | 146 | (service tailscaled-service-type 147 | (tailscaled-configuration 148 | (package (S "tailscale")))) 149 | 150 | (service dnsmasq-service-type 151 | (dnsmasq-configuration 152 | (listen-addresses '("127.0.0.1" "::1")) 153 | (no-resolv? #t) 154 | (servers '("192.168.1.1" 155 | ;; Tailscale 156 | "/unicorn-typhon.ts.net/100.100.100.100" 157 | ;; OpenDNS servers 158 | "208.67.222.222" 159 | "208.67.220.220" 160 | "2620:119:35::35" 161 | "2620:119:53::53")))) 162 | 163 | (service tor-service-type 164 | (tor-configuration 165 | (config-file 166 | (plain-file 167 | "extra-torrc-bits" 168 | (string-append 169 | "# NumCPUs only affects relays, but we want to silence the warnings\n" 170 | "NumCPUs 2\n"))) 171 | (hidden-services 172 | (list 173 | (tor-onion-service-configuration 174 | (name "ssh") 175 | (mapping '((22 "127.0.0.1:22")))) 176 | (tor-onion-service-configuration 177 | (name "guix-publish") 178 | ;; k7muufoychzetmq7evsv6gcq4sxq4olxo3uy2zlhek5fkfvl5uscbgyd.onion 179 | (mapping '((3000 "127.0.0.1:3000")))))))) 180 | 181 | (service cups-service-type 182 | (cups-configuration 183 | (web-interface? #t) 184 | (default-paper-size "A4") 185 | (extensions 186 | (list cups-filters hplip-minimal)))) 187 | 188 | ;(udev-rules-service 'u2f libfido2 #:groups '("plugdev")) 189 | 190 | (service mcron-service-type 191 | (mcron-configuration 192 | (jobs (append 193 | %btrfs-defrag-var-guix 194 | (%btrfs-maintenance-jobs "/"))))) 195 | 196 | (service libvirt-service-type 197 | (libvirt-configuration 198 | (unix-sock-group "libvirt"))) 199 | (service virtlog-service-type) 200 | 201 | (service qemu-binfmt-service-type 202 | (qemu-binfmt-configuration 203 | ;; We get some architectures for free. 204 | (platforms 205 | (fold delete %qemu-platforms 206 | (lookup-qemu-platforms "i386" "x86_64"))))) 207 | 208 | (service earlyoom-service-type 209 | (earlyoom-configuration 210 | (prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)") 211 | (avoid-regexp "guile"))) 212 | 213 | (service zram-device-service-type 214 | (zram-device-configuration 215 | (size (* 16 (expt 2 30))) 216 | (compression-algorithm 'zstd) 217 | (priority 100))) 218 | 219 | (service sddm-service-type 220 | (sddm-configuration 221 | (theme "guix-simplyblack-sddm") 222 | ;; This is failing since the update to sddm-0.20.0 223 | ;(display-server "wayland") 224 | )) 225 | 226 | (remove (lambda (service) 227 | (let ((type (service-kind service))) 228 | (or (memq type 229 | (list 230 | gdm-service-type 231 | modem-manager-service-type 232 | screen-locker-service-type)) 233 | (eq? 'network-manager-applet 234 | (service-type-name type))))) 235 | (modify-services 236 | %desktop-services 237 | (guix-service-type 238 | config => 239 | (guix-configuration 240 | (inherit config) 241 | ;; Rely on btrfs compression. 242 | (log-compression 'none) 243 | (discover? #t) 244 | (substitute-urls %substitute-urls) 245 | (authorized-keys %authorized-keys) 246 | (extra-options 247 | (cons* "--max-jobs=5" %extra-options)))))))) 248 | 249 | ;; Allow resolution of '.local' host names with mDNS. 250 | (name-service-switch %mdns-host-lookup-nss)) 251 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /E5400_config.scm: -------------------------------------------------------------------------------- 1 | (define-module (E5400_config)) 2 | (use-modules (guix store) 3 | (guix gexp) 4 | (gnu) 5 | (gnu system locale) 6 | (config filesystems) 7 | (config guix-daemon) 8 | (srfi srfi-1)) 9 | (use-service-modules 10 | cups 11 | desktop 12 | linux 13 | mcron 14 | networking 15 | ssh 16 | xorg) 17 | (use-package-modules 18 | cups 19 | fonts 20 | gnome 21 | linux 22 | pulseaudio) 23 | 24 | (operating-system 25 | (host-name "E5400") 26 | (timezone "Asia/Jerusalem") 27 | (locale "en_US.UTF-8") 28 | (locale-definitions 29 | (list (locale-definition (source "en_US") 30 | (name "en_US.UTF-8")) 31 | (locale-definition (source "he_IL") 32 | (name "he_IL.UTF-8")))) 33 | 34 | (bootloader (bootloader-configuration 35 | (bootloader grub-bootloader) 36 | (targets '("/dev/sda" "/dev/sdb" "/dev/sdc")))) 37 | 38 | (file-systems (cons* (file-system 39 | (device (file-system-label "root")) 40 | (mount-point "/") 41 | (type "btrfs") 42 | (options "compress=zstd,discard,ssd_spread,space_cache=v2")) 43 | (file-system 44 | (device (file-system-label "data")) 45 | (mount-point "/data") 46 | (mount-may-fail? #t) 47 | (type "btrfs") 48 | (options "compress=zstd,space_cache=v2")) 49 | %guix-temproots 50 | %base-file-systems)) 51 | 52 | (swap-devices 53 | (list (swap-space 54 | (priority 50) 55 | (target (uuid "66e10e64-e066-4c77-9ce7-63198f98aa88"))))) 56 | 57 | (users (cons* (user-account 58 | (name "efraim") 59 | (comment "Efraim") 60 | (group "users") 61 | (supplementary-groups '("wheel" "netdev" "kvm" 62 | "lp" "lpadmin" 63 | "audio" "video")) 64 | (home-directory "/home/efraim")) 65 | (user-account 66 | (name "kids") 67 | (comment "both kids") 68 | (group "users") 69 | (supplementary-groups '("netdev" 70 | "audio" "video")) 71 | (home-directory "/home/kids")) 72 | %base-user-accounts)) 73 | 74 | ;; This is where we specify system-wide packages. 75 | (packages (cons* gvfs ;for user mounts 76 | pavucontrol 77 | btrfs-progs compsize 78 | font-terminus font-dejavu 79 | font-opendyslexic 80 | %base-packages)) 81 | 82 | (services (cons* (service xfce-desktop-service-type) 83 | 84 | (service guix-publish-service-type 85 | (guix-publish-configuration 86 | (host "0.0.0.0") 87 | (port 3000) 88 | (advertise? #t))) 89 | (service openssh-service-type 90 | (openssh-configuration 91 | (password-authentication? #t))) 92 | 93 | (service tor-service-type 94 | (tor-configuration 95 | (hidden-services 96 | (list 97 | (tor-onion-service-configuration 98 | (name "ssh") 99 | (mapping '((22 "127.0.0.1:22")))) 100 | (tor-onion-service-configuration 101 | (name "guix-publish") 102 | ;; jlcmm5lblot62p4txmplf66d76bsrfs4ilhcwaswjdulf6htvntxztad.onion 103 | (mapping '((3000 "127.0.0.1:3000")))))))) 104 | 105 | (service cups-service-type 106 | (cups-configuration 107 | (web-interface? #t) 108 | (default-paper-size "A4") 109 | (extensions 110 | (list cups-filters hplip-minimal)))) 111 | 112 | (service mcron-service-type 113 | (mcron-configuration 114 | (jobs (append (%btrfs-maintenance-jobs "/") 115 | (%btrfs-maintenance-jobs "/data"))))) 116 | 117 | (service openntpd-service-type 118 | (openntpd-configuration 119 | (listen-on '("127.0.0.1" "::1")) 120 | (constraints-from '("https://www.google.com/")))) 121 | 122 | (service earlyoom-service-type 123 | (earlyoom-configuration 124 | (prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)") 125 | (avoid-regexp "xfce"))) 126 | 127 | (service zram-device-service-type 128 | (zram-device-configuration 129 | (size (* 2 (expt 2 30))) 130 | (compression-algorithm 'zstd) 131 | (priority 100))) 132 | 133 | (service slim-service-type) 134 | 135 | (remove (lambda (service) 136 | (let ((type (service-kind service))) 137 | (or (memq type 138 | (list 139 | gdm-service-type 140 | ntp-service-type))))) 141 | (modify-services 142 | %desktop-services 143 | (guix-service-type 144 | config => 145 | (guix-configuration 146 | (inherit config) 147 | ;; Rely on btrfs compression. 148 | (log-compression 'none) 149 | (discover? #t) 150 | (substitute-urls %substitute-urls) 151 | (authorized-keys %authorized-keys) 152 | (extra-options %extra-options))))))) 153 | 154 | ;; Allow resolution of '.local' host names with mDNS. 155 | (name-service-switch %mdns-host-lookup-nss)) 156 | -------------------------------------------------------------------------------- /Extras/3900XT_publish.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #5711CA127D5AE4E2BC8414224EEE042776DE4F76A53D71615D344819575921DC#))) 5 | -------------------------------------------------------------------------------- /Extras/E5400_publish.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #BD4DE537DDCB025BD75159B84C53E26AE8F56B639ED4D42C7FE5BF93DB1015F2#))) 5 | -------------------------------------------------------------------------------- /Extras/X1.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #6A2E785CE4DAC7A163068947C01717F18FEFB933F251FAA1F943F52FE265EAB7#))) 5 | -------------------------------------------------------------------------------- /Extras/bordeaux.guix.gnu.org.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #7D602902D3A2DBB83F8A0FB98602A754C5493B0B778C8D1DD4E0F41DE14DE34F#))) 5 | -------------------------------------------------------------------------------- /Extras/ci.guix.gnu.org.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #8D156F295D24B0D9A86FA5741A840FF2D24F60F7B6C4134814AD55625971B394#))) 5 | -------------------------------------------------------------------------------- /Extras/cuirass.genenetwork.org.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #9578AD6CDB23BA51F9C4185D5D5A32A7EEB47ACDD55F1CCB8CEE4E0570FBF961#))) 5 | -------------------------------------------------------------------------------- /Extras/efraim.pub: -------------------------------------------------------------------------------- 1 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF3PkIpyUbnAtS8B5oO1rDm2vW5xhArIVjaRJrZzHVkX efraim@flashner.co.il 2 | -------------------------------------------------------------------------------- /Extras/g4_publish.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #C787534E48AD0A32BEF82E024DF7AE67FF3C4756CA73B4C212C02DCB95CE5C6D#))) 5 | -------------------------------------------------------------------------------- /Extras/guix.bordeaux.inria.fr.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #89FBA276A976A8DE2A69774771A92C8C879E0F24614AAAAE23119608707B3F06#))) 5 | -------------------------------------------------------------------------------- /Extras/guix.genenetwork.org.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #9F56EAB5CE37AA15693C31F451140588240F259676C137E31C0CA70EC4D1B534#))) 5 | -------------------------------------------------------------------------------- /Extras/guix.tobias.gr.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #E21911E159DB6D031A763509A255B054360A4A96F5668CBBAC48052E67D274D3#))) 5 | -------------------------------------------------------------------------------- /Extras/macbook41.config: -------------------------------------------------------------------------------- 1 | #Modules are needed 2 | CONFIG_MODULES=y 3 | CONFIG_SCSI_SAS_ATTRS=m 4 | CONFIG_INPUT_POLLDEV=m 5 | CONFIG_FB_SYS_IMAGEBLIT=m 6 | CONFIG_SND_HDA=m 7 | CONFIG_ZSTD_COMPRESS=m 8 | CONFIG_BRIDGE_NF_EBTABLES=m 9 | CONFIG_BRIDGE_EBT_T_FILTER=m 10 | CONFIG_HID_APPLEIR=m 11 | CONFIG_DM_CRYPT=m 12 | CONFIG_GARP=m 13 | CONFIG_VIRTIO_NET=m 14 | CONFIG_IP_NF_TARGET_MASQUERADE=m 15 | CONFIG_BRIDGE=m 16 | CONFIG_XOR_BLOCKS=m 17 | CONFIG_NETFILTER_XTABLES=m 18 | CONFIG_IP_NF_NAT=m 19 | CONFIG_INPUT_PCSPKR=m 20 | CONFIG_IP_NF_MANGLE=m 21 | CONFIG_RAID6_PQ=m 22 | CONFIG_PATA_ATIIXP=m 23 | CONFIG_SCSI_ISCI=m 24 | CONFIG_IP_NF_TARGET_REJECT=m 25 | CONFIG_ITCO_WDT=m 26 | CONFIG_USB_UAS=m 27 | CONFIG_B43=m 28 | CONFIG_VLAN_8021Q=m 29 | CONFIG_SENSORS_CORETEMP=m 30 | CONFIG_SND_TIMER=m 31 | CONFIG_SND_HWDEP=m 32 | CONFIG_BTRFS_FS=m 33 | CONFIG_HW_RANDOM_VIRTIO=m 34 | CONFIG_DRM_KMS_HELPER=m 35 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m 36 | CONFIG_VIRTIO_BALLOON=m 37 | CONFIG_CFG80211=m 38 | CONFIG_MAC80211=m 39 | CONFIG_IP6_NF_FILTER=m 40 | CONFIG_LLC=m 41 | CONFIG_VIRTIO_CONSOLE=m 42 | CONFIG_FIREWIRE=m 43 | CONFIG_ITCO_WDT=m 44 | CONFIG_USB_KBD=m 45 | CONFIG_IP_NF_IPTABLES=m 46 | CONFIG_IRQ_BYPASS_MANAGER=m 47 | CONFIG_STP=m 48 | CONFIG_CRC_ITU_T=m 49 | CONFIG_NF_NAT=m 50 | CONFIG_PATA_ACPI=m 51 | CONFIG_MOUSE_APPLETOUCH=m 52 | CONFIG_IP6_NF_IPTABLES=m 53 | CONFIG_I2C_I801=m 54 | CONFIG_SND_HDA_INTEL=m 55 | CONFIG_USB_MOUSE=m 56 | CONFIG_SKY2=m 57 | CONFIG_CRYPTO_XTS=m 58 | CONFIG_NF_CONNTRACK=m 59 | CONFIG_SCSI_SAS_LIBSAS=m 60 | CONFIG_MAC_EMUMOUSEBTN=m 61 | CONFIG_CRYPTO_WP512=m 62 | CONFIG_NF_NAT_IPV4=m 63 | CONFIG_NF_DEFRAG_IPV6=m 64 | CONFIG_LPC_ICH=m 65 | CONFIG_SND_HDA_CORE=m 66 | CONFIG_SND_HDA_GENERIC=m 67 | CONFIG_SATA_AHCI=m 68 | CONFIG_SATA_ACARD_AHCI=m 69 | CONFIG_SATA_AHCI_SEATTLE=m 70 | CONFIG_SATA_AHCI_PLATFORM=m 71 | CONFIG_SATA_HIGHBANK=m 72 | CONFIG_AHCI_BRCM=m 73 | CONFIG_AHCI_CEVA=m 74 | CONFIG_AHCI_DA850=m 75 | CONFIG_AHCI_DM816=m 76 | CONFIG_AHCI_IMX=m 77 | CONFIG_AHCI_MTK=m 78 | CONFIG_AHCI_MVEBU=m 79 | CONFIG_AHCI_SUNXI=m 80 | CONFIG_AHCI_ST=m 81 | CONFIG_AHCI_TEGRA=m 82 | CONFIG_AHCI_XGENE=m 83 | CONFIG_AHCI_QORIQ=m 84 | CONFIG_BACKLIGHT_APPLE=m 85 | CONFIG_SND_PCM=m 86 | CONFIG_CORDIC=m 87 | CONFIG_SATA_AHCI=m 88 | CONFIG_INPUT_JOYDEV=m 89 | CONFIG_FB_SYS_COPYAREA=m 90 | CONFIG_CRYPTO_SERPENT=m 91 | CONFIG_CEC_CORE=m 92 | CONFIG_RAS_CEC=m 93 | CONFIG_USB_STORAGE=m 94 | CONFIG_IP_NF_FILTER=m 95 | CONFIG_HID_APPLE=m 96 | CONFIG_HID=m 97 | CONFIG_NF_REJECT_IPV4=m 98 | CONFIG_VIRTIO_BLK=m 99 | CONFIG_SENSORS_APPLESMC=m 100 | CONFIG_ZSTD_DECOMPRESS=m 101 | CONFIG_INPUT_LEDS=m 102 | CONFIG_SND=m 103 | CONFIG_NET_DEVLINK=m 104 | CONFIG_ACPI_SBS=m 105 | CONFIG_USB_ISIGHTFW=m 106 | CONFIG_FB_INTEL=m 107 | CONFIG_NF_DEFRAG_IPV4=m 108 | CONFIG_VIRTIO_PCI=m 109 | CONFIG_DRM_I915=m 110 | CONFIG_FB_SYS_FOPS=m 111 | CONFIG_DRM=m 112 | CONFIG_USB_HCD_SSB=m 113 | CONFIG_BCMA=m 114 | CONFIG_HID_GENERIC=m 115 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 116 | CONFIG_KVM_ARM_HOST=m 117 | CONFIG_KVM=m 118 | CONFIG_KVM_GUEST=m 119 | CONFIG_KVM_E500V2=m 120 | CONFIG_KVM_E500MC=m 121 | CONFIG_KVM_BOOK3S_64=m 122 | CONFIG_KVM_BOOK3S_32=m 123 | CONFIG_KVM=m 124 | CONFIG_KVM_GUEST=m 125 | CONFIG_KVM=m 126 | CONFIG_ACPI_VIDEO=m 127 | CONFIG_FB_SYS_FILLRECT=m 128 | CONFIG_ACPI_SBS=m 129 | CONFIG_NLS_ISO8859_1=m 130 | CONFIG_VIRTIO=m 131 | CONFIG_SND_HDA_CODEC_REALTEK=m 132 | CONFIG_USB_HID=m 133 | CONFIG_MRP=m 134 | CONFIG_NETFILTER_XTABLES=m 135 | CONFIG_LEDS_TRIGGER_AUDIO=m 136 | CONFIG_LIBCRC32C=m 137 | CONFIG_I2C_ALGOBIT=m 138 | CONFIG_VIRTIO=m 139 | CONFIG_KVM_INTEL=m 140 | CONFIG_FIREWIRE_OHCI=m 141 | CONFIG_SOUND=m 142 | CONFIG_SSB=m 143 | -------------------------------------------------------------------------------- /Extras/pbp-asound.state: -------------------------------------------------------------------------------- 1 | state.rockchipes8316c { 2 | control.1 { 3 | iface CARD 4 | name 'Headphones Jack' 5 | value false 6 | comment { 7 | access read 8 | type BOOLEAN 9 | count 1 10 | } 11 | } 12 | control.2 { 13 | iface MIXER 14 | name 'Headphone Playback Volume' 15 | value.0 2 16 | value.1 2 17 | comment { 18 | access 'read write' 19 | type INTEGER 20 | count 2 21 | range '0 - 3' 22 | dbmin -4800 23 | dbmax 0 24 | dbvalue.0 -1200 25 | dbvalue.1 -1200 26 | } 27 | } 28 | control.3 { 29 | iface MIXER 30 | name 'Headphone Mixer Volume' 31 | value.0 11 32 | value.1 11 33 | comment { 34 | access 'read write' 35 | type INTEGER 36 | count 2 37 | range '0 - 11' 38 | dbmin -1200 39 | dbmax 0 40 | dbvalue.0 0 41 | dbvalue.1 0 42 | } 43 | } 44 | control.4 { 45 | iface MIXER 46 | name 'Playback Polarity' 47 | value 'R Invert' 48 | comment { 49 | access 'read write' 50 | type ENUMERATED 51 | count 1 52 | item.0 Normal 53 | item.1 'R Invert' 54 | item.2 'L Invert' 55 | item.3 'L + R Invert' 56 | } 57 | } 58 | control.5 { 59 | iface MIXER 60 | name 'DAC Playback Volume' 61 | value.0 192 62 | value.1 192 63 | comment { 64 | access 'read write' 65 | type INTEGER 66 | count 2 67 | range '0 - 192' 68 | dbmin -9999999 69 | dbmax 0 70 | dbvalue.0 0 71 | dbvalue.1 0 72 | } 73 | } 74 | control.6 { 75 | iface MIXER 76 | name 'DAC Soft Ramp Switch' 77 | value false 78 | comment { 79 | access 'read write' 80 | type BOOLEAN 81 | count 1 82 | } 83 | } 84 | control.7 { 85 | iface MIXER 86 | name 'DAC Soft Ramp Rate' 87 | value 4 88 | comment { 89 | access 'read write' 90 | type INTEGER 91 | count 1 92 | range '0 - 4' 93 | } 94 | } 95 | control.8 { 96 | iface MIXER 97 | name 'DAC Notch Filter Switch' 98 | value false 99 | comment { 100 | access 'read write' 101 | type BOOLEAN 102 | count 1 103 | } 104 | } 105 | control.9 { 106 | iface MIXER 107 | name 'DAC Double Fs Switch' 108 | value false 109 | comment { 110 | access 'read write' 111 | type BOOLEAN 112 | count 1 113 | } 114 | } 115 | control.10 { 116 | iface MIXER 117 | name 'DAC Stereo Enhancement' 118 | value 5 119 | comment { 120 | access 'read write' 121 | type INTEGER 122 | count 1 123 | range '0 - 7' 124 | } 125 | } 126 | control.11 { 127 | iface MIXER 128 | name 'DAC Mono Mix Switch' 129 | value false 130 | comment { 131 | access 'read write' 132 | type BOOLEAN 133 | count 1 134 | } 135 | } 136 | control.12 { 137 | iface MIXER 138 | name 'Capture Polarity' 139 | value Normal 140 | comment { 141 | access 'read write' 142 | type ENUMERATED 143 | count 1 144 | item.0 Normal 145 | item.1 Invert 146 | } 147 | } 148 | control.13 { 149 | iface MIXER 150 | name 'Mic Boost Switch' 151 | value true 152 | comment { 153 | access 'read write' 154 | type BOOLEAN 155 | count 1 156 | } 157 | } 158 | control.14 { 159 | iface MIXER 160 | name 'ADC Capture Volume' 161 | value 192 162 | comment { 163 | access 'read write' 164 | type INTEGER 165 | count 1 166 | range '0 - 192' 167 | dbmin -9999999 168 | dbmax 0 169 | dbvalue.0 0 170 | } 171 | } 172 | control.15 { 173 | iface MIXER 174 | name 'ADC PGA Gain Volume' 175 | value 0 176 | comment { 177 | access 'read write' 178 | type INTEGER 179 | count 1 180 | range '0 - 10' 181 | } 182 | } 183 | control.16 { 184 | iface MIXER 185 | name 'ADC Soft Ramp Switch' 186 | value false 187 | comment { 188 | access 'read write' 189 | type BOOLEAN 190 | count 1 191 | } 192 | } 193 | control.17 { 194 | iface MIXER 195 | name 'ADC Double Fs Switch' 196 | value false 197 | comment { 198 | access 'read write' 199 | type BOOLEAN 200 | count 1 201 | } 202 | } 203 | control.18 { 204 | iface MIXER 205 | name 'ALC Capture Switch' 206 | value false 207 | comment { 208 | access 'read write' 209 | type BOOLEAN 210 | count 1 211 | } 212 | } 213 | control.19 { 214 | iface MIXER 215 | name 'ALC Capture Max Volume' 216 | value 28 217 | comment { 218 | access 'read write' 219 | type INTEGER 220 | count 1 221 | range '0 - 28' 222 | dbmin -650 223 | dbmax 3550 224 | dbvalue.0 3550 225 | } 226 | } 227 | control.20 { 228 | iface MIXER 229 | name 'ALC Capture Min Volume' 230 | value 0 231 | comment { 232 | access 'read write' 233 | type INTEGER 234 | count 1 235 | range '0 - 28' 236 | dbmin -1200 237 | dbmax 3000 238 | dbvalue.0 -1200 239 | } 240 | } 241 | control.21 { 242 | iface MIXER 243 | name 'ALC Capture Target Volume' 244 | value 11 245 | comment { 246 | access 'read write' 247 | type INTEGER 248 | count 1 249 | range '0 - 10' 250 | dbmin -1650 251 | dbmax -150 252 | dbvalue.0 0 253 | } 254 | } 255 | control.22 { 256 | iface MIXER 257 | name 'ALC Capture Hold Time' 258 | value 0 259 | comment { 260 | access 'read write' 261 | type INTEGER 262 | count 1 263 | range '0 - 10' 264 | } 265 | } 266 | control.23 { 267 | iface MIXER 268 | name 'ALC Capture Decay Time' 269 | value 3 270 | comment { 271 | access 'read write' 272 | type INTEGER 273 | count 1 274 | range '0 - 10' 275 | } 276 | } 277 | control.24 { 278 | iface MIXER 279 | name 'ALC Capture Attack Time' 280 | value 2 281 | comment { 282 | access 'read write' 283 | type INTEGER 284 | count 1 285 | range '0 - 10' 286 | } 287 | } 288 | control.25 { 289 | iface MIXER 290 | name 'ALC Capture Noise Gate Switch' 291 | value false 292 | comment { 293 | access 'read write' 294 | type BOOLEAN 295 | count 1 296 | } 297 | } 298 | control.26 { 299 | iface MIXER 300 | name 'ALC Capture Noise Gate Threshold' 301 | value 0 302 | comment { 303 | access 'read write' 304 | type INTEGER 305 | count 1 306 | range '0 - 31' 307 | } 308 | } 309 | control.27 { 310 | iface MIXER 311 | name 'ALC Capture Noise Gate Type' 312 | value 'Constant PGA Gain' 313 | comment { 314 | access 'read write' 315 | type ENUMERATED 316 | count 1 317 | item.0 'Constant PGA Gain' 318 | item.1 'Mute ADC Output' 319 | } 320 | } 321 | control.28 { 322 | iface MIXER 323 | name 'Speaker Switch' 324 | value true 325 | comment { 326 | access 'read write' 327 | type BOOLEAN 328 | count 1 329 | } 330 | } 331 | control.29 { 332 | iface MIXER 333 | name 'Differential Mux' 334 | value lin1-rin1 335 | comment { 336 | access 'read write' 337 | type ENUMERATED 338 | count 1 339 | item.0 lin1-rin1 340 | item.1 lin2-rin2 341 | item.2 'lin1-rin1 with 20db Boost' 342 | item.3 'lin2-rin2 with 20db Boost' 343 | } 344 | } 345 | control.30 { 346 | iface MIXER 347 | name 'Digital Mic Mux' 348 | value 'dmic disable' 349 | comment { 350 | access 'read write' 351 | type ENUMERATED 352 | count 1 353 | item.0 'dmic disable' 354 | item.1 'dmic data at high level' 355 | item.2 'dmic data at low level' 356 | } 357 | } 358 | control.31 { 359 | iface MIXER 360 | name 'DAC Source Mux' 361 | value 'LDATA TO LDAC, RDATA TO RDAC' 362 | comment { 363 | access 'read write' 364 | type ENUMERATED 365 | count 1 366 | item.0 'LDATA TO LDAC, RDATA TO RDAC' 367 | item.1 'LDATA TO LDAC, LDATA TO RDAC' 368 | item.2 'RDATA TO LDAC, RDATA TO RDAC' 369 | item.3 'RDATA TO LDAC, LDATA TO RDAC' 370 | } 371 | } 372 | control.32 { 373 | iface MIXER 374 | name 'Left Headphone Mux' 375 | value lin1-rin1 376 | comment { 377 | access 'read write' 378 | type ENUMERATED 379 | count 1 380 | item.0 lin1-rin1 381 | item.1 lin2-rin2 382 | item.2 'lin-rin with Boost' 383 | item.3 'lin-rin with Boost and PGA' 384 | } 385 | } 386 | control.33 { 387 | iface MIXER 388 | name 'Right Headphone Mux' 389 | value lin1-rin1 390 | comment { 391 | access 'read write' 392 | type ENUMERATED 393 | count 1 394 | item.0 lin1-rin1 395 | item.1 lin2-rin2 396 | item.2 'lin-rin with Boost' 397 | item.3 'lin-rin with Boost and PGA' 398 | } 399 | } 400 | control.34 { 401 | iface MIXER 402 | name 'Left Headphone Mixer LLIN Switch' 403 | value false 404 | comment { 405 | access 'read write' 406 | type BOOLEAN 407 | count 1 408 | } 409 | } 410 | control.35 { 411 | iface MIXER 412 | name 'Left Headphone Mixer Left DAC Switch' 413 | value true 414 | comment { 415 | access 'read write' 416 | type BOOLEAN 417 | count 1 418 | } 419 | } 420 | control.36 { 421 | iface MIXER 422 | name 'Right Headphone Mixer RLIN Switch' 423 | value false 424 | comment { 425 | access 'read write' 426 | type BOOLEAN 427 | count 1 428 | } 429 | } 430 | control.37 { 431 | iface MIXER 432 | name 'Right Headphone Mixer Right DAC Switch' 433 | value true 434 | comment { 435 | access 'read write' 436 | type BOOLEAN 437 | count 1 438 | } 439 | } 440 | } 441 | -------------------------------------------------------------------------------- /Extras/penguin2.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #9818B468D566414446AB32B7B6450EA217344827A7E454BCBAC5F94060CFA765#))) 5 | -------------------------------------------------------------------------------- /Extras/pine64_publish.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #C84999C08274F74A4001D8D19B605BE86D36B700CA71CE9A13C54704FDFC3646#))) 5 | -------------------------------------------------------------------------------- /Extras/pinebookpro_publish.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #62C2D54208181ED0A46597B0C0C0BC16EE1F1ECE7E007BE93DAE913C254B6571#) 5 | ) 6 | ) 7 | -------------------------------------------------------------------------------- /Extras/rock64-1.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #EC09BF6B0DAD43E07A20CFB12D30FF93B4CDD0D58063D5D1E4AD4518DD7E975F#))) 5 | -------------------------------------------------------------------------------- /Extras/rpi5b.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #D0254DDCA3A4421C37A33A64C87F145BDF061B1733876B8EA5D287AA61D4BA56#))) 5 | -------------------------------------------------------------------------------- /Extras/starfive-vision1.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #8FAD6D2DCE31293CEF91577F39E873933817D9A8B2FCA9B130EC25DE3019F347#))) 5 | -------------------------------------------------------------------------------- /Extras/starfive-vision2.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #31BFBA0C26660451A8DF121DE7F32448603741B09E4430058AEE3118D4AACB35#))) 5 | -------------------------------------------------------------------------------- /Extras/unmatched_publish.pub: -------------------------------------------------------------------------------- 1 | (public-key 2 | (ecc 3 | (curve Ed25519) 4 | (q #AA45681B639BA4CA883379CC27C0E0A0D0A6D3E602FEFEA13DF3C055659067E1#))) 5 | -------------------------------------------------------------------------------- /Guix_manifest.scm: -------------------------------------------------------------------------------- 1 | (define-module (Guix_manifest)) 2 | (use-modules (guix profiles) 3 | (guix transformations) 4 | (guix packages) 5 | (guix utils) 6 | (gnu packages) 7 | (ice-9 match) 8 | (srfi srfi-1)) 9 | 10 | (define headless? 11 | (eq? #f (getenv "DISPLAY"))) 12 | 13 | (define UTenn_machines 14 | (list "lily" 15 | "octopus01" 16 | "penguin2" 17 | "space" 18 | "tux01" 19 | "tux02" 20 | "tux03")) 21 | 22 | (define guix-system 23 | (file-exists? "/run/current-system/provenance")) 24 | 25 | (define work-machine? 26 | (not (eq? #f (member (gethostname) 27 | (cons "bayfront" 28 | UTenn_machines))))) 29 | 30 | (define %GUI-only 31 | (list "adwaita-icon-theme" 32 | "ephoto" 33 | "evisum" 34 | "font-culmus" 35 | "font-dejavu" 36 | "font-ghostscript" 37 | "font-gnu-freefont" 38 | "font-gnu-unifont" 39 | "font-opendyslexic" 40 | "font-terminus" 41 | "flatpak" 42 | "gst-plugins-good" 43 | "gst-plugins-ugly" 44 | "icecat" 45 | "kdeconnect" 46 | "keepassxc" 47 | "lagrange" 48 | "libnotify" ; notify-send 49 | "libreoffice" 50 | "mpv" 51 | "mpv-mpris" 52 | "mupdf" 53 | "my-moreutils" 54 | "netsurf" 55 | "nheko" 56 | "pavucontrol" 57 | "pinentry-efl" 58 | "qtwayland" 59 | "quasselclient" 60 | "qutebrowser" 61 | "terminology" 62 | "viewnior" 63 | "wl-clipboard-x11" 64 | "zathura" 65 | "zathura-pdf-poppler")) 66 | 67 | (define %work-applications 68 | (list ;"diffoscope" 69 | "mercurial" 70 | "strace")) 71 | 72 | (define %not-for-work 73 | (list "btrfs-progs" 74 | "catimg" 75 | "ffmpeg" 76 | "git-annex" 77 | "isync" 78 | "keybase" 79 | "khal" 80 | "khard" 81 | "libhdate" 82 | "msmtp" 83 | "mutt" 84 | "newsboat" 85 | "parcimonie" 86 | "sshfs" 87 | "syncthing" 88 | "toot" 89 | "vdirsyncer" 90 | "weechat" 91 | "yt-dlp")) 92 | 93 | (define %headless 94 | (list "pinentry-tty")) 95 | 96 | (define %guix-system-apps 97 | ;; These packages are provided by Guix System. 98 | (list "guile" 99 | "guile-colorized" 100 | "guile-readline" 101 | "mcron" 102 | "shepherd")) 103 | 104 | (define %cli-apps 105 | (list "aria2" 106 | "aspell" 107 | "aspell-dict-en" 108 | "aspell-dict-he" 109 | "bidiv" 110 | "bash-completion" 111 | "file" 112 | "git" 113 | "git:send-email" 114 | "glibc-locales" 115 | "global" 116 | "gnupg" 117 | "hunspell-dict-en" 118 | "links" 119 | "myrepos" 120 | "ncdu" 121 | "nmap" 122 | "nss-certs" 123 | "openssh" 124 | "parallel" 125 | "qrencode" 126 | "rsync" 127 | "screen" 128 | "stow" 129 | "tig" 130 | "torsocks" 131 | "translate-shell" 132 | "tree" 133 | "urlscan" 134 | "vifm" 135 | "vim" 136 | "vim-airline" 137 | "vim-dispatch" 138 | "vim-fugitive" 139 | "vim-gnupg" 140 | "vim-guix-vim" 141 | "editorconfig-vim" 142 | "wcalc" 143 | "wget" 144 | "wgetpaste")) 145 | 146 | 147 | ;; https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html 148 | 149 | (define S specification->package) 150 | 151 | ;(define package-transformations 152 | ; (options->transformation 153 | ; (if (false-if-exception (S "ssl-ntv")) 154 | ; `((with-graft . "openssl=ssl-ntv") 155 | ; (with-branch . "vim-guix-vim=master")) 156 | ; '((with-branch . "vim-guix-vim=master"))))) 157 | 158 | ;; https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html#index-input-rewriting 159 | ;; Both of these are equivalent to '--with-input' 160 | ;; package-input-rewriting => takes an 'identity' 161 | ;; package-input-rewriting/spec => takes a name 162 | 163 | ;(define modified-packages 164 | ; (package-input-rewriting/spec 165 | ; ;; We leave the conditional here too to prevent searching for (dfsg main sdl). 166 | ; `(("sdl2" . ,(if work-machine? 167 | ; (const (S "sdl2")) 168 | ; (const (@ (dfsg main sdl) sdl2-2.0.14))))))) 169 | 170 | (packages->manifest 171 | (map (compose list specification->package+output) 172 | (filter (lambda (pkg) 173 | (member (or (%current-system) 174 | (%current-target-system)) 175 | (package-transitive-supported-systems 176 | (specification->package+output pkg)))) 177 | (append 178 | (if (or headless? 179 | (not guix-system)) 180 | %headless 181 | %GUI-only) 182 | (if work-machine? 183 | %work-applications 184 | %not-for-work) 185 | (if guix-system 186 | '() 187 | %guix-system-apps) 188 | %cli-apps)))) 189 | -------------------------------------------------------------------------------- /X1.scm: -------------------------------------------------------------------------------- 1 | ;; https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Carbon_(Gen_9) 2 | (define-module (X1)) 3 | (use-modules 4 | (gnu) 5 | (gnu system locale) 6 | (nongnu packages linux) 7 | (guix transformations) 8 | (config filesystems) 9 | (config guix-daemon) 10 | (dfsg contrib services tailscale) 11 | (srfi srfi-1)) 12 | (use-service-modules 13 | dns 14 | desktop 15 | linux 16 | mcron 17 | networking 18 | pm 19 | sddm 20 | ssh 21 | virtualization 22 | xorg) 23 | (use-package-modules 24 | linux) 25 | 26 | (define with-transformations 27 | (options->transformation 28 | `())) 29 | ;`((tune . "cannonlake")))) 30 | 31 | (define (S pkg) 32 | (with-transformations (specification->package pkg))) 33 | 34 | (define %sway-keyboard-function-keys 35 | (mixed-text-file 36 | "keyboard-function-keys" 37 | "bindsym XF86AudioMute exec " (S "pulseaudio") "/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle\n" 38 | "bindsym XF86AudioLowerVolume exec " (S "pulseaudio") "/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%\n" 39 | "bindsym XF86AudioRaiseVolume exec " (S "pulseaudio") "/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%\n" 40 | "bindsym XF86AudioMicMute exec " (S "pulseaudio") "/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle\n" 41 | "bindsym XF86MonBrightnessDown exec " (S "brightnessctl") "/bin/brightnessctl set 5%-\n" 42 | "bindsym XF86MonBrightnessUp exec " (S "brightnessctl") "/bin/brightnessctl set 5%+\n" 43 | ;; bindsym XF86Display 44 | "bindsym XF86WLAN exec " (S "util-linux") "/sbin/rfkill toggle all\n" 45 | "bindsym XF86NotificationCenter exec " (S "dunst") "/bin/dunstctl set-paused toggle\n" 46 | ;; bindsym XF86PickupPhone 47 | ;; bindsym XF86HangupPhone 48 | ;; bindsym XF86Favorites 49 | )) 50 | 51 | (operating-system 52 | (host-name "X1") 53 | (timezone "Asia/Jerusalem") 54 | (locale "en_IL.utf8") 55 | (locale-definitions 56 | (list (locale-definition (source "en_US") 57 | (name "en_US.UTF-8")) 58 | (locale-definition (source "he_IL") 59 | (name "he_IL.UTF-8")))) 60 | (keyboard-layout 61 | (keyboard-layout "us" "altgr-intl")) 62 | 63 | (bootloader 64 | (bootloader-configuration 65 | (bootloader grub-efi-bootloader) 66 | (targets '("/boot/efi")) 67 | (keyboard-layout keyboard-layout))) 68 | 69 | (kernel linux) 70 | (firmware 71 | (list i915-firmware 72 | ibt-hw-firmware 73 | iwlwifi-firmware 74 | sof-firmware 75 | wireless-regdb)) 76 | 77 | (file-systems 78 | (cons* (file-system 79 | (mount-point "/") 80 | (device 81 | (uuid "f5bb474f-b7e7-46e1-b913-c1927df99a91" 82 | 'btrfs)) 83 | (type "btrfs") 84 | (options "compress=zstd,discard,space_cache=v2")) 85 | (file-system 86 | (mount-point "/boot/efi") 87 | (device (uuid "30D4-D6C5" 'fat32)) 88 | (type "vfat")) 89 | %tmp-tmpfs 90 | %guix-temproots 91 | %base-file-systems)) 92 | 93 | (users (cons* (user-account 94 | (name "efraim") 95 | (comment "Efraim Flashner") 96 | (group "users") 97 | (home-directory "/home/efraim") 98 | (supplementary-groups 99 | '("wheel" "netdev" "kvm" 100 | ;"plugdev" 101 | "audio" "video"))) 102 | %base-user-accounts)) 103 | (packages 104 | (map with-transformations 105 | (append 106 | (map specification->package 107 | (list "adwaita-icon-theme" 108 | "compsize" 109 | "git-minimal" ; git-upload-pack 110 | "guix-backgrounds" 111 | "guix-simplyblack-sddm-theme" ; sddm theme 112 | "virt-manager" 113 | "xterm" 114 | 115 | "sway" 116 | "swayidle" 117 | "swaylock" 118 | 119 | "dunst" 120 | "i3status" 121 | "tofi")) 122 | %base-packages))) 123 | 124 | (services 125 | (cons* (service screen-locker-service-type 126 | (screen-locker-configuration 127 | (name "swaylock") 128 | (program (file-append (S "swaylock") 129 | "/bin/swaylock")) 130 | (allow-empty-password? #f) 131 | (using-pam? #t) 132 | (using-setuid? #f))) 133 | 134 | (simple-service 'sway-kbd-fn-keys etc-service-type 135 | `(("sway/config.d/function-keys" 136 | ,%sway-keyboard-function-keys))) 137 | 138 | (service tlp-service-type) 139 | 140 | (service openssh-service-type 141 | (openssh-configuration 142 | (password-authentication? #t))) 143 | ;; guix system: error: symlink: File exists: "/etc/ssh" 144 | ;(simple-service 'ssh-known-hosts etc-service-type 145 | ; `(("ssh/ssh_known_hosts" ,(local-file "Extras/ssh-known-hosts")))) 146 | 147 | (service tailscaled-service-type 148 | (tailscaled-configuration 149 | (package (S "tailscale")))) 150 | 151 | (service dnsmasq-service-type 152 | (dnsmasq-configuration 153 | (listen-addresses '("127.0.0.1" "::1")) 154 | (no-resolv? #t) 155 | (servers '("192.168.1.1" 156 | ;; Tailscale 157 | "/unicorn-typhon.ts.net/100.100.100.100" 158 | ;; OpenDNS servers 159 | "208.67.222.222" 160 | "208.67.220.220" 161 | "2620:119:35::35" 162 | "2620:119:53::53")))) 163 | 164 | (service tor-service-type 165 | (tor-configuration 166 | (hidden-services 167 | (list 168 | (tor-onion-service-configuration 169 | (name "ssh") 170 | (mapping '((22 "127.0.0.1:22")))))))) 171 | 172 | ;(udev-rules-service 'u2f libfido2 #:groups '("plugdev")) 173 | 174 | (service mcron-service-type 175 | (mcron-configuration 176 | (jobs (append 177 | %btrfs-defrag-var-guix 178 | (%btrfs-maintenance-jobs "/"))))) 179 | 180 | (service qemu-binfmt-service-type 181 | (qemu-binfmt-configuration 182 | ;; We get some architectures for free. 183 | (platforms 184 | (fold delete %qemu-platforms 185 | (lookup-qemu-platforms "i386" "x86_64"))))) 186 | 187 | (service earlyoom-service-type 188 | (earlyoom-configuration 189 | (prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)") 190 | (avoid-regexp "guile"))) 191 | 192 | (service zram-device-service-type 193 | (zram-device-configuration 194 | (size (* 8 (expt 2 30))) 195 | (compression-algorithm 'zstd) 196 | (priority 100))) 197 | 198 | (service sddm-service-type 199 | (sddm-configuration 200 | (theme "guix-simplyblack-sddm") 201 | ;; This is failing since the update to sddm-0.20.0 202 | ;(display-server "wayland") 203 | )) 204 | 205 | (remove (lambda (service) 206 | (let ((type (service-kind service))) 207 | (or (memq type 208 | (list 209 | gdm-service-type 210 | modem-manager-service-type 211 | screen-locker-service-type)) 212 | (eq? 'network-manager-applet 213 | (service-type-name type))))) 214 | (modify-services 215 | %desktop-services 216 | (guix-service-type 217 | config => 218 | (guix-configuration 219 | (inherit config) 220 | ;; Rely on btrfs compression. 221 | (log-compression 'none) 222 | (discover? #t) 223 | (substitute-urls %substitute-urls) 224 | (authorized-keys %authorized-keys) 225 | (extra-options %extra-options))))))) 226 | 227 | ;; Allow resolution of '.local' host names with mDNS. 228 | (name-service-switch %mdns-host-lookup-nss)) 229 | -------------------------------------------------------------------------------- /aarch64-deploy.scm: -------------------------------------------------------------------------------- 1 | (define-module (aarch64-deploy)) 2 | (use-modules (pine64) 3 | (rock64) 4 | (gnu machine) 5 | (gnu machine ssh)) 6 | 7 | (list (machine 8 | (operating-system %pine64-system) 9 | (environment managed-host-environment-type) 10 | (configuration (machine-ssh-configuration 11 | (host-name "pine64.unicorn-typhon.ts.net") 12 | ;(host-name "192.168.68.51") 13 | (system "aarch64-linux") 14 | (port 22) 15 | (user "efraim") 16 | (identity "/home/efraim/.ssh/id_ecdsa") 17 | (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAhNEOFzg4QMgRzivcJwHQHhbVY0AAHwx9l+65wDMO6X")))) 18 | 19 | (machine 20 | (operating-system %rock64-system) 21 | (environment managed-host-environment-type) 22 | (configuration (machine-ssh-configuration 23 | (host-name "rock64.unicorn-typhon.ts.net") 24 | ;(host-name "192.168.68.56") 25 | (system "aarch64-linux") 26 | (port 22) 27 | (user "efraim") 28 | (identity "/home/efraim/.ssh/id_ecdsa") 29 | (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP9kV+GUPVd13NudY7iQUPBsAmMQklSRUnIMRGmeXcos"))))) 30 | 31 | ;; For /etc/passwd 32 | ;; efraim ALL = NOPASSWD: ALL 33 | ;; time guix deploy -L ~/workspace/my-guix -L ~/workspace/guix-config ~/workspace/guix-config/aarch64-deploy.scm 34 | -------------------------------------------------------------------------------- /alacritty.toml: -------------------------------------------------------------------------------- 1 | [env] 2 | TERM = "xterm-256color" 3 | 4 | [font] 5 | size = 10.0 6 | 7 | [window] 8 | dynamic_title = true 9 | -------------------------------------------------------------------------------- /config/filesystems.scm: -------------------------------------------------------------------------------- 1 | (define-module (config filesystems) 2 | #:use-module (gnu system file-systems) 3 | #:use-module (gnu services mcron) 4 | #:use-module (gnu packages linux) 5 | #:use-module (guix gexp) 6 | #:export (%btrfs-maintenance-jobs 7 | %btrfs-defrag-var-guix 8 | %guix-temproots 9 | %tmp-tmpfs)) 10 | 11 | (define (%btrfs-maintenance-jobs mount-point) 12 | (list 13 | #~(job '(next-hour '(3)) 14 | (string-append #$btrfs-progs "/bin/btrfs " 15 | "scrub " "start " "-c " "idle " 16 | #$mount-point)) 17 | #~(job '(next-hour '(5)) 18 | (string-append #$btrfs-progs "/bin/btrfs " 19 | "balance " "start " 20 | "-dusage=50,limit=3 " 21 | "-musage=50,limit=1 " 22 | #$mount-point)))) 23 | 24 | (define %btrfs-defrag-var-guix 25 | (list 26 | #~(job '(next-hour '(2)) 27 | (string-append #$btrfs-progs "/bin/btrfs " 28 | "filesystem " 29 | "defragment " 30 | "-rczstd " 31 | "/var/guix")))) 32 | 33 | ;; 10MiB should be enough, but 'guix lint -c derivations' needs much more. 34 | (define %guix-temproots 35 | (file-system 36 | (device "tmpfs") 37 | (mount-point "/var/guix/temproots") 38 | (type "tmpfs") 39 | (flags '(no-suid no-dev no-exec)) 40 | (check? #f))) 41 | 42 | ;; Defaults to 50% 43 | (define %tmp-tmpfs 44 | (file-system 45 | (device "tmpfs") 46 | (mount-point "/tmp") 47 | (type "tmpfs") 48 | (flags '(no-suid)) 49 | (check? #f))) 50 | -------------------------------------------------------------------------------- /config/guix-daemon.scm: -------------------------------------------------------------------------------- 1 | (define-module (config guix-daemon) 2 | #:use-module (guix gexp) 3 | #:use-module (gnu services base) 4 | #:export (%guix-configuration 5 | %substitute-urls 6 | %authorized-keys 7 | %extra-options)) 8 | 9 | (define %substitute-urls 10 | (list "https://bordeaux.guix.gnu.org" 11 | "https://ci.guix.gnu.org" 12 | ;"https://4zwzi66wwdaalbhgnix55ea3ab4pvvw66ll2ow53kjub6se4q2bclcyd.onion" 13 | "https://cuirass.genenetwork.org" 14 | "http://guix.genenetwork.org" 15 | "https://guix.tobias.gr")) 16 | 17 | (define %authorized-keys 18 | (list (local-file "../Extras/3900XT_publish.pub") 19 | (local-file "../Extras/E5400_publish.pub") 20 | (local-file "../Extras/pinebookpro_publish.pub") 21 | (local-file "../Extras/pine64_publish.pub") 22 | (local-file "../Extras/rock64-1.pub") 23 | (local-file "../Extras/X1.pub") 24 | (local-file "../Extras/rpi5b.pub") 25 | (local-file "../Extras/g4_publish.pub") 26 | (local-file "../Extras/unmatched_publish.pub") 27 | (local-file "../Extras/starfive-vision1.pub") 28 | (local-file "../Extras/starfive-vision2.pub") 29 | (local-file "../Extras/ci.guix.gnu.org.pub") 30 | (local-file "../Extras/bordeaux.guix.gnu.org.pub") 31 | (local-file "../Extras/cuirass.genenetwork.org.pub") 32 | (local-file "../Extras/guix.genenetwork.org.pub") 33 | (local-file "../Extras/guix.tobias.gr.pub"))) 34 | 35 | (define %extra-options 36 | (list "--gc-keep-derivations=yes" 37 | "--gc-keep-outputs=yes")) 38 | 39 | (define %guix-configuration 40 | (guix-configuration 41 | (inherit guix-configuration) 42 | (substitute-urls %substitute-urls) 43 | (authorized-keys %authorized-keys) 44 | (extra-options %extra-options))) 45 | -------------------------------------------------------------------------------- /config/xorg-modules.scm: -------------------------------------------------------------------------------- 1 | (define-module (config xorg-modules) 2 | #:use-module (gnu packages xorg) 3 | #:export (%intel-xorg-modules)) 4 | 5 | ;; It must be an explicit list, 'fold delete %default-xorg-modules' isn't enough. 6 | (define %intel-xorg-modules 7 | (list xf86-video-vesa 8 | xf86-video-fbdev 9 | xf86-video-intel 10 | xf86-input-libinput)) 11 | -------------------------------------------------------------------------------- /gparted.scm: -------------------------------------------------------------------------------- 1 | ;; This is an operating system configuration for a bootable GParted image. 2 | ;; Modify it as you see fit and rebuild it by running: 3 | ;; 4 | ;; guix system image /path/to/gparted.scm 5 | ;; 6 | 7 | (define-module (gparted)) 8 | (use-modules (gnu) 9 | (guix) 10 | (guix transformations) 11 | (srfi srfi-1) 12 | (guix build-system trivial)) 13 | (use-service-modules 14 | admin 15 | xorg) 16 | (use-package-modules 17 | compression 18 | disk 19 | fontutils 20 | gl 21 | gtk 22 | linux 23 | llvm 24 | package-management 25 | wm 26 | xorg) 27 | 28 | ;; 29 | 30 | (define gtk+-minimal 31 | (package/inherit gtk+ 32 | (arguments 33 | (substitute-keyword-arguments (package-arguments gtk+) 34 | ;; The tests need more of the inputs that we've stripped 35 | ;; away in order to pass. Skip the tests for now. 36 | ((#:tests? _ #t) #f) 37 | ((#:configure-flags _ #~'()) 38 | #~(list "-Dwayland_backend=false" 39 | "-Dprint_backends=file" 40 | "-Dintrospection=false")) 41 | ((#:phases phases) 42 | #~(modify-phases #$phases 43 | (add-after 'install 'remove-localizations 44 | (lambda* (#:key outputs #:allow-other-keys) 45 | (delete-file-recursively 46 | (string-append (assoc-ref outputs "out") 47 | "/share/locale")))))))) 48 | (propagated-inputs 49 | (modify-inputs (package-propagated-inputs gtk+) 50 | (prepend gdk-pixbuf) 51 | (delete "fontconfig" 52 | "freetype" 53 | "librsvg" ; gdk-pixbuf 54 | "libcloudproviders-minimal" 55 | "libx11" 56 | "libxcomposite" 57 | "libxcursor" 58 | "libxdamage" 59 | "libxext" 60 | "libxfixes" 61 | "libxinerama" 62 | "libxkbcommon" 63 | "libxrender" 64 | "mesa" 65 | "wayland" 66 | "wayland-protocols"))) 67 | (inputs 68 | (modify-inputs (package-inputs gtk+) 69 | (delete "colord-minimal" 70 | "cups" 71 | "graphene" 72 | "iso-codes" 73 | "harfbuzz"))))) 74 | 75 | (define harfbuzz-minimal 76 | (package/inherit harfbuzz 77 | (outputs (cons "doc" (package-outputs harfbuzz))) 78 | (arguments 79 | (substitute-keyword-arguments (package-arguments harfbuzz) 80 | ((#:configure-flags cf ''()) 81 | `(cons* "--with-icu=no" 82 | ;"--disable-introspection" ; causes pango to fail 83 | "--disable-gtk-doc-html" 84 | (string-append "--with-html-dir=" 85 | (assoc-ref %outputs "doc") 86 | "/share/gtk-doc/html") 87 | (delete "--with-graphite2" ,cf))))) 88 | (propagated-inputs 89 | (modify-inputs (package-propagated-inputs harfbuzz) 90 | (delete "graphite2" "icu4c"))))) 91 | 92 | ;; freetype-config embeds a reference to pkg-config. 93 | (define freetype-minimal 94 | (package 95 | (inherit freetype) 96 | (arguments 97 | (substitute-keyword-arguments (package-arguments freetype) 98 | ((#:configure-flags _) 99 | ;`(list "--disable-static")))))) 100 | `(list "--disable-freetype-config")))))) 101 | 102 | (define btrfs-progs-minimal 103 | (package 104 | (inherit btrfs-progs) 105 | (arguments 106 | (substitute-keyword-arguments (package-arguments btrfs-progs) 107 | ((#:configure-flags cf #~'()) 108 | ;; texlive-bin FTBFS with the package changes. 109 | #~(cons* "--disable-documentation" #$cf)))) 110 | (native-inputs 111 | (modify-inputs (package-native-inputs btrfs-progs) 112 | (delete "python-sphinx"))))) 113 | 114 | ;; Is it worth it? This is also pulled in by e2fsprogs which comes with the 115 | ;; initramfs, meaning we effectively have two copies in the OS closure. 116 | (define util-linux-minimal 117 | (package/inherit util-linux 118 | (arguments 119 | (substitute-keyword-arguments (package-arguments util-linux) 120 | ((#:phases phases '%standard-phases) 121 | `(modify-phases ,phases 122 | (add-after 'install 'remove-localizations 123 | (lambda* (#:key outputs #:allow-other-keys) 124 | (delete-file-recursively 125 | ;; ~75% of the "lib" output. 126 | (string-append (assoc-ref outputs "lib") 127 | "/share/locale")))))))))) 128 | 129 | (define (remove-static-libraries pkg) 130 | (package/inherit pkg 131 | (arguments 132 | (substitute-keyword-arguments (package-arguments pkg) 133 | ((#:phases phases '%standard-phases) 134 | `(modify-phases ,phases 135 | (add-after 'install 'delete-static-libraries 136 | (lambda* (#:key outputs #:allow-other-keys) 137 | (for-each delete-file 138 | (find-files 139 | (string-append (assoc-ref outputs "out") "/lib") 140 | "\\.a$")))))))))) 141 | 142 | (define libelf-smaller 143 | (remove-static-libraries (specification->package "libelf"))) 144 | 145 | (define elfutils-smaller 146 | (remove-static-libraries (specification->package "elfutils"))) 147 | 148 | (define readline-smaller 149 | (remove-static-libraries (specification->package "readline"))) 150 | 151 | (define parted-minimal 152 | (package 153 | (inherit parted) 154 | (arguments 155 | (substitute-keyword-arguments (package-arguments parted) 156 | ((#:configure-flags cf #~'()) 157 | #~(cons* "--without-readline" 158 | "--disable-static" 159 | #$cf)))) 160 | (inputs (modify-inputs (package-inputs parted) 161 | (delete "readline"))))) 162 | 163 | (define mesa-smaller 164 | (package/inherit mesa 165 | (arguments 166 | (substitute-keyword-arguments (package-arguments mesa) 167 | ((#:modules modules) 168 | `((ice-9 regex) 169 | (srfi srfi-26) 170 | ,@modules)) 171 | ((#:build-type _) "minsize") ; decreases the size by ~30%. 172 | ((#:configure-flags cf #~'()) 173 | #~(append 174 | (remove 175 | (cut string-match 176 | "-D(platforms|vulkan-(drivers|layers)|gles2|gbm|shared-glapi)=.*" <>) 177 | #$cf) 178 | 179 | ;; This has to go last so we can disable vulkan. 180 | (list "-Dplatforms=x11" 181 | "-Dvulkan-drivers="))) 182 | ((#:phases phases) 183 | #~(modify-phases #$phases 184 | (delete 'set-layer-path-in-manifests))))) 185 | (inputs 186 | (modify-inputs (package-inputs mesa) 187 | ;; TODO: Can this be taken care of with use-minimized-inputs? 188 | ;(replace "llvm" llvm-minimal) 189 | (delete "wayland" "wayland-protocols"))))) 190 | 191 | ;; We could use a newer version of llvm, but this is the version mesa 192 | ;; is currently built against, so it has the most testing in Guix. 193 | (define llvm-minimal 194 | (package/inherit llvm-for-mesa 195 | ;; If we can separate out the include directory we'd save another 21MB. 196 | (outputs (list "out")) 197 | (version (package-version llvm-for-mesa)) 198 | (arguments 199 | (substitute-keyword-arguments (package-arguments llvm-for-mesa) 200 | ((#:build-type _) "MinSizeRel") ; decreases the size by ~25% 201 | ((#:configure-flags cf ''()) 202 | ;; AMDGPU is needed by the vulkan drivers. 203 | `(list ,(string-append "-DLLVM_TARGETS_TO_BUILD=" 204 | (system->llvm-target) ";AMDGPU") 205 | "-DLLVM_BUILD_TOOLS=NO" 206 | "-DLLVM_BUILD_LLVM_DYLIB=YES" 207 | "-DLLVM_LINK_LLVM_DYLIB=YES")))))) 208 | 209 | (define use-minimized-inputs 210 | (package-input-rewriting/spec 211 | `(;("elfutils" . ,(const elfutils-smaller)) 212 | ;("freetype" . ,(const freetype-minimal)) 213 | ("gtk+" . ,(const gtk+-minimal)) 214 | ;("harfbuzz" . ,(const harfbuzz-minimal)) 215 | ;("libelf" . ,(const libelf-smaller)) 216 | ;("llvm" . ,(const llvm-minimal)) 217 | ;("mesa" . ,(const mesa-smaller)) ; breaks xorg-server tests? 218 | ;("parted" . ,(const parted-minimal)) 219 | ;("readline" . ,(const readline-smaller)) 220 | ;("util-linux" . ,(const util-linux-minimal)) 221 | ))) 222 | 223 | ;; 224 | 225 | ;; This needs to be rebuilt, not just substituted. 226 | (define fluxbox-custom 227 | (let ((base (use-minimized-inputs fluxbox))) 228 | (package 229 | (inherit base) 230 | (arguments 231 | (substitute-keyword-arguments (package-arguments base) 232 | ((#:phases phases) 233 | `(modify-phases ,phases 234 | (delete 'install-vim-files) 235 | (add-after 'install 'adjust-fluxbox-menu 236 | (lambda* (#:key outputs #:allow-other-keys) 237 | (let ((out (assoc-ref %outputs "out"))) 238 | (substitute* (string-append out "/share/fluxbox/menu") 239 | (("\\(firefox.*") "(gparted) {gparted}\n")))))))))))) 240 | 241 | (define gparted-custom 242 | (package 243 | (inherit (use-minimized-inputs gparted)) 244 | (arguments 245 | (substitute-keyword-arguments (package-arguments gparted) 246 | ((#:configure-flags cf ''()) 247 | `(cons* "--enable-libparted-dmraid" ,cf)))))) 248 | 249 | (define* (minimized-package pkg) 250 | (package 251 | (inherit (use-minimized-inputs pkg)))) 252 | 253 | (define fuse-minimized 254 | (minimized-package fuse)) 255 | 256 | (define lvm2-minimized 257 | (minimized-package lvm2)) 258 | 259 | (define mdadm-minimized 260 | (minimized-package mdadm)) 261 | 262 | ;; 263 | 264 | (operating-system 265 | (host-name "gnu") 266 | (timezone "Etc/UTC") 267 | (locale "en_US.utf8") 268 | (keyboard-layout (keyboard-layout "us" "altgr-intl")) 269 | 270 | ;; Label for the GRUB boot menu. 271 | (label (string-append "GNU Guix " (package-version guix) " with GParted")) 272 | 273 | (bootloader (bootloader-configuration 274 | (bootloader 275 | (bootloader (inherit grub-bootloader) 276 | (package (minimized-package (specification->package "grub"))))) 277 | (targets '("/dev/vda")) 278 | (terminal-outputs '(console)))) 279 | (file-systems (cons (file-system 280 | (device (file-system-label "root")) 281 | (mount-point "/") 282 | (type "ext4")) 283 | %base-file-systems)) 284 | (firmware '()) 285 | (locale-libcs (list glibc)) 286 | 287 | (users %base-user-accounts) 288 | 289 | (packages 290 | (append 291 | (map use-minimized-inputs 292 | (append 293 | (map specification->package 294 | (list 295 | "neofetch" ; bash-minimal 296 | 297 | "xterm" ; actually, a lot 298 | 299 | "cryptsetup" ; libgcrypt, util-linux:lib, eudev, json-c, argon2, libgpg-error, popt, lvm2 300 | "lvm2" ; lvm2-static has a larger size than lvm2 with the same closure 301 | "mdadm" ; eudev 302 | 303 | ;"bcachefs-tools" 304 | ;"btrfs-progs" ; zstd:lib, e2fsprogs, eudev, zlib, lzo 305 | "dosfstools" ; only glibc, gcc:lib 306 | "mtools" ; needed by fat16/fat32; glibc, gcc:lib, bash-minimal 307 | ;; Already included from the filesystem type. 308 | ;"e2fsprogs" ; util-linux:lib 309 | "exfatprogs" ; only glibc, gcc:lib 310 | "f2fs-tools" ; util-linux:lib 311 | "jfsutils" ; util-linux:lib 312 | "nilfs-utils" ; util-linux:lib 313 | "ntfs-3g" ; fuse-2 314 | "udftools" ; only glibc, gcc:lib 315 | "xfsprogs")) 316 | (list btrfs-progs-minimal 317 | gparted-custom 318 | fluxbox-custom) ; also a lot :/ 319 | %base-packages-interactive 320 | %base-packages-linux 321 | %base-packages-utils)))) 322 | 323 | ;; Use a modified list of setuid-programs. 324 | ;; Are there any we need? We run as root. 325 | (privileged-programs 326 | (list 327 | ; (setuid-program (program (file-append foo "/bin/foo"))) 328 | )) 329 | 330 | (services 331 | (append 332 | (list (service slim-service-type 333 | (slim-configuration 334 | (slim (minimized-package (specification->package "slim"))) 335 | (auto-login? #t) 336 | (default-user "root") 337 | (xorg-configuration 338 | (xorg-configuration 339 | (keyboard-layout keyboard-layout))))) 340 | 341 | (service special-files-service-type 342 | `(("/root/.fluxbox/startup" 343 | ,(mixed-text-file 344 | "fluxbox-startup" 345 | "exec /run/current-system/profile/bin/gparted &\n" 346 | "exec /run/current-system/profile/bin/xterm &\n" 347 | "exec fluxbox\n"))))) 348 | 349 | (remove (lambda (service) 350 | (let ((type (service-kind service))) 351 | (memq type 352 | (list 353 | guix-service-type ; not actually needed 354 | log-cleanup-service-type 355 | nscd-service-type ; no networking 356 | log-rotation-service-type)))) 357 | (modify-services 358 | %base-services 359 | (udev-service-type 360 | config => 361 | (udev-configuration 362 | (udev (minimized-package (specification->package "eudev"))) 363 | (rules (list fuse-minimized 364 | lvm2-minimized 365 | mdadm-minimized))))))))) 366 | -------------------------------------------------------------------------------- /i3status-config: -------------------------------------------------------------------------------- 1 | # i3status configuration file. 2 | # see "man i3status" for documentation. 3 | 4 | # It is important that this file is edited as UTF-8. 5 | # The following line should contain a sharp s: 6 | # ß 7 | # If the above line is not correctly displayed, fix your editor first! 8 | 9 | general { 10 | output_format = "i3bar" 11 | colors = true 12 | interval = 5 13 | } 14 | 15 | #order += "ipv6" 16 | #order += "wireless _first_" 17 | order += "ethernet _first_" 18 | #order += "battery all" 19 | order += "cpu_temperature_0" 20 | order += "disk /tmp" 21 | order += "load" 22 | order += "memory" 23 | order += "volume master" 24 | order += "tztime local" 25 | 26 | wireless _first_ { 27 | format_up = "W: (%quality at %essid) %ip" 28 | format_down = "W: down" 29 | } 30 | 31 | ethernet _first_ { 32 | format_up = "E: %ip (%speed)" 33 | format_down = "E: down" 34 | } 35 | 36 | battery all { 37 | format = "%status %percentage %remaining" 38 | } 39 | 40 | disk "/" { 41 | format = "%avail" 42 | } 43 | 44 | disk "/tmp" { 45 | format = "/tmp: %used / %total" 46 | } 47 | 48 | load { 49 | format = "[ load: %1min | %5min | %15min ]" 50 | max_threshold = "20" 51 | } 52 | 53 | cpu_temperature 0 { 54 | format = "T: %degrees °C" 55 | path = "/sys/devices/platform/PNP0C14:00/wmi_bus/wmi_bus-PNP0C14:00/DEADBEEF-2001-0000-00A0-C90629100000/hwmon/hwmon3/temp1_input" 56 | } 57 | 58 | memory { 59 | format = "%used / %total" 60 | memory_used_method = "memavailable" 61 | threshold_degraded = "10%" 62 | format_degraded = "MEMORY < %available" 63 | } 64 | 65 | # This causes issues on 3900XT 66 | volume master { 67 | format = "♪: %volume" 68 | format_muted = "♪: muted (%volume)" 69 | #device = "alsa_output.pci-0000_0b_00.4.analog-stereo" 70 | } 71 | 72 | tztime local { 73 | #format = "%Y-%m-%d %H:%M:%S" 74 | # date --rfc-email 75 | format = "%a, %d %B %Y %X %z" 76 | } 77 | -------------------------------------------------------------------------------- /kids_manifest.scm: -------------------------------------------------------------------------------- 1 | (define-module (kids_manifest)) 2 | (use-modules (guix profiles) 3 | (gnu packages)) 4 | 5 | (packages->manifest 6 | (map (compose list specification->package+output) 7 | (list 8 | "font-dejavu" 9 | "font-terminus" 10 | "gcompris-qt" 11 | "glibc-locales" 12 | "gnujump" 13 | "icecat" 14 | "kodi" 15 | "ktouch" 16 | "quadrapassel" 17 | "supertux" 18 | "supertuxkart" 19 | "tuxmath"))) 20 | -------------------------------------------------------------------------------- /lemote.scm: -------------------------------------------------------------------------------- 1 | (define-module (lemote)) 2 | (use-modules (guix packages) 3 | (gnu) 4 | (gnu system locale) 5 | (config filesystems) 6 | (config guix-daemon) 7 | (srfi srfi-1)) 8 | (use-service-modules 9 | linux 10 | ;mcron 11 | networking 12 | ssh) 13 | (use-package-modules 14 | connman 15 | linux) 16 | 17 | (operating-system 18 | (host-name "lemote") 19 | (timezone "Asia/Jerusalem") 20 | (locale "en_US.UTF-8") 21 | (locale-definitions 22 | (list (locale-definition (source "en_US") 23 | (name "en_US.UTF-8")) 24 | (locale-definition (source "he_IL") 25 | (name "he_IL.UTF-8")))) 26 | 27 | (bootloader (bootloader-configuration 28 | (bootloader grub-bootloader) 29 | (targets '("/dev/sda")))) 30 | 31 | (firmware '()) 32 | 33 | (initrd-modules '()) 34 | (kernel linux-libre-mips64el-fuloong2e) 35 | 36 | (file-systems (cons* (file-system 37 | (device (file-system-label "root")) 38 | (mount-point "/") 39 | (type "ext4")) 40 | (file-system 41 | (device (file-system-label "boot")) 42 | (mount-point "/boot") 43 | (type "ext2")) 44 | %guix-temproots 45 | %base-file-systems)) 46 | 47 | (users (cons (user-account 48 | (name "efraim") 49 | (comment "Efraim") 50 | (group "users") 51 | (supplementary-groups '("wheel" 52 | "netdev" "kvm")) 53 | (home-directory "/home/efraim")) 54 | %base-user-accounts)) 55 | 56 | ;; This is where we specify system-wide packages. 57 | (packages (cons* ;btrfs-progs compsize 58 | (delete (specification->package "guix-icons") %base-packages))) 59 | 60 | (services (cons* ;(service agetty-service-type 61 | ; (agetty-configuration 62 | ; (extra-options '("-L")) ; no carrier detect 63 | ; (baud-rate "115200") 64 | ; (term "vt100") 65 | ; (tty "ttyS0"))) 66 | 67 | (service guix-publish-service-type 68 | (guix-publish-configuration 69 | (host "0.0.0.0") 70 | (port 3000))) 71 | (service openssh-service-type 72 | (openssh-configuration 73 | (x11-forwarding? #t) 74 | (extra-content "StreamLocalBindUnlink yes"))) 75 | 76 | ;(service tor-service-type) 77 | ;(tor-hidden-service "ssh" 78 | ; '((22 "127.0.0.1:22"))) 79 | ;(tor-hidden-service "guix-publish" 80 | ; '((3000 "127.0.0.1:3000"))) 81 | 82 | ;; Image created with ext4 83 | ;(service mcron-service-type 84 | ; (mcron-configuration 85 | ; (jobs (%btrfs-maintenance-jobs "/")))) 86 | 87 | ;(service openntpd-service-type 88 | ; (openntpd-configuration 89 | ; (listen-on '("127.0.0.1" "::1")) 90 | ; (allow-large-adjustment? #t))) 91 | 92 | ;; elogind cannot be cross compiled 93 | ;(service connman-service-type) 94 | ;(service wpa-supplicant-service-type) 95 | 96 | ;; Not supported by the chosen kernel 97 | ;(service zram-device-service-type 98 | ; (zram-device-configuration 99 | ; (size (* 2 (expt 2 30))) 100 | ; (compression-algorithm 'zstd) 101 | ; (priority 100))) 102 | 103 | (modify-services 104 | %base-services 105 | (guix-service-type 106 | config => 107 | (guix-configuration 108 | (inherit config) 109 | (substitute-urls %substitute-urls) 110 | (authorized-keys %authorized-keys) 111 | (extra-options %extra-options)))))) 112 | 113 | ;; Allow resolution of '.local' host names with mDNS. 114 | (name-service-switch %mdns-host-lookup-nss)) 115 | -------------------------------------------------------------------------------- /novena.scm: -------------------------------------------------------------------------------- 1 | (define-module (novena)) 2 | (use-modules (guix packages) 3 | (gnu) 4 | (gnu bootloader u-boot) 5 | (gnu system locale) 6 | (config filesystems) 7 | (config guix-daemon) 8 | (dfsg contrib services tailscale) 9 | (srfi srfi-1)) 10 | (use-service-modules 11 | linux 12 | mcron 13 | networking 14 | ssh) 15 | (use-package-modules 16 | linux) 17 | (export %novena-system) 18 | 19 | (define %novena-system 20 | (operating-system 21 | (host-name "novena") 22 | (timezone "Asia/Jerusalem") 23 | (locale "en_IL.utf8") 24 | (locale-definitions 25 | (list (locale-definition (source "en_US") 26 | (name "en_US.UTF-8")) 27 | (locale-definition (source "he_IL") 28 | (name "he_IL.UTF-8")))) 29 | (keyboard-layout 30 | (keyboard-layout "us" "altgr-intl")) 31 | 32 | (bootloader 33 | (bootloader-configuration 34 | (bootloader u-boot-novena-bootloader) 35 | (targets '("/dev/mmcblk0")))) ; SD card/eMMC (SD priority) storage 36 | 37 | (initrd-modules '()) 38 | (kernel linux-libre-arm-generic-5.10) 39 | (kernel-arguments '("console=ttymxc1,115200")) 40 | (firmware '()) 41 | 42 | (file-systems 43 | (cons* (file-system 44 | (device (file-system-label "Guix_image")) 45 | (mount-point "/") 46 | (type "ext4")) 47 | %guix-temproots 48 | %base-file-systems)) 49 | 50 | (users (cons (user-account 51 | (name "efraim") 52 | (comment "Efraim") 53 | (group "users") 54 | (home-directory "/home/efraim") 55 | (password "$6$4t79wXvnVk$bjwOl0YCkILfyWbr1BBxiPxJ0GJhdFrPdbBjndFjZpqHwd9poOpq2x5WtdWPWElK8tQ8rHJLg3mJ4ZfjrQekL1") 56 | (supplementary-groups '("wheel" 57 | "netdev" "kvm"))) 58 | %base-user-accounts)) 59 | 60 | (sudoers-file 61 | (plain-file "sudoers" 62 | (string-append (plain-file-content %sudoers-specification) 63 | (format #f "efraim ALL = NOPASSWD: ALL~%")))) 64 | 65 | ;; This is where we specify system-wide packages. 66 | (packages 67 | (append 68 | (map specification->package 69 | (list "screen")) 70 | (delete (specification->package "guix-icons") %base-packages))) 71 | 72 | (services 73 | (cons* (service openssh-service-type 74 | (openssh-configuration 75 | (openssh (specification->package "openssh-sans-x")) 76 | (authorized-keys 77 | `(("efraim" ,(local-file "Extras/efraim.pub")))))) 78 | 79 | (service tailscaled-service-type 80 | (tailscaled-configuration 81 | (package (specification->package "tailscale")))) 82 | 83 | (service mcron-service-type 84 | (mcron-configuration 85 | (jobs 86 | (list 87 | #~(job '(next-hour '(3)) 88 | "guix gc --free-space=15G") 89 | ;; The board powers up at unix date 0. 90 | ;; Restart ntpd regularly to set the clock. 91 | #~(job '(next-hour '(0 6 12 18)) 92 | "/run/current-system/profile/bin/herd restart ntpd"))))) 93 | 94 | (service ntp-service-type) 95 | 96 | (service dhcp-client-service-type) 97 | 98 | (service earlyoom-service-type 99 | (earlyoom-configuration 100 | (prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)") 101 | (avoid-regexp "guile"))) 102 | 103 | (service zram-device-service-type 104 | (zram-device-configuration 105 | (size (* 2 (expt 2 30))) 106 | (compression-algorithm 'zstd) 107 | (priority 100))) 108 | 109 | (modify-services 110 | %base-services 111 | (guix-service-type 112 | config => 113 | (guix-configuration 114 | (inherit config) 115 | (substitute-urls '()) ; Offload machine 116 | (authorized-keys %authorized-keys) 117 | (extra-options 118 | (cons* "--cores=3" 119 | "--cache-failures" 120 | %extra-options))))))) 121 | 122 | ;; Allow resolution of '.local' host names with mDNS. 123 | (name-service-switch %mdns-host-lookup-nss))) 124 | 125 | %novena-system 126 | 127 | ;; guix system image --image-type=novena-raw -L ~/workspace/my-guix/ -L ~/workspace/guix-config/ ~/workspace/guix-config/novena.scm --system=armhf-linux 128 | ;; guix system image --image-type=novena-raw -L ~/workspace/my-guix/ -L ~/workspace/guix-config/ ~/workspace/guix-config/novena.scm --target=arm-linux-gnueabihf 129 | 130 | ;; sudo cfdisk /dev/sdX to resize /dev/sdX1 to use the remaining space left at the end of the µSD card 131 | ;; guix shell e2fsprogs -- sudo resize2fs /dev/sdX1 132 | ;; guix shell e2fsck-static -- sudo -E e2fsck /dev/sdX1 133 | -------------------------------------------------------------------------------- /pine64-deploy.scm: -------------------------------------------------------------------------------- 1 | (define-module (pine64-deploy)) 2 | (use-modules (pine64) 3 | (gnu machine) 4 | (gnu machine ssh)) 5 | 6 | (list (machine 7 | (operating-system %pine64-system) 8 | (environment managed-host-environment-type) 9 | (configuration (machine-ssh-configuration 10 | (host-name "pine64.unicorn-typhon.ts.net") 11 | ;(host-name "192.168.68.51") 12 | (system "aarch64-linux") 13 | (port 22) 14 | (user "efraim") 15 | (identity "/home/efraim/.ssh/id_ecdsa") 16 | (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAhNEOFzg4QMgRzivcJwHQHhbVY0AAHwx9l+65wDMO6X"))))) 17 | 18 | ;; For /etc/passwd 19 | ;; efraim ALL = NOPASSWD: ALL 20 | ;; time guix deploy -L ~/workspace/my-guix -L ~/workspace/guix-config ~/workspace/guix-config/pine64-deploy.scm 21 | -------------------------------------------------------------------------------- /pine64.scm: -------------------------------------------------------------------------------- 1 | (define-module (pine64)) 2 | (use-modules (guix packages) 3 | (gnu) 4 | (gnu bootloader u-boot) 5 | (gnu system locale) 6 | (config filesystems) 7 | (config guix-daemon) 8 | (dfsg contrib services tailscale) 9 | (srfi srfi-1)) 10 | (use-service-modules 11 | linux 12 | mcron 13 | networking 14 | ssh) 15 | (use-package-modules 16 | linux) 17 | (export %pine64-system) 18 | 19 | (define %pine64-system 20 | (operating-system 21 | (host-name "pine64") 22 | (timezone "Asia/Jerusalem") 23 | (locale "en_IL.utf8") 24 | (locale-definitions 25 | (list (locale-definition (source "en_US") 26 | (name "en_US.UTF-8")) 27 | (locale-definition (source "he_IL") 28 | (name "he_IL.UTF-8")))) 29 | (keyboard-layout 30 | (keyboard-layout "us" "altgr-intl")) 31 | 32 | (bootloader 33 | (bootloader-configuration 34 | (bootloader u-boot-pine64-plus-bootloader) 35 | (targets '("/dev/mmcblk0")))) ; SD card/eMMC (SD priority) storage 36 | 37 | (initrd-modules '()) 38 | (kernel linux-libre-arm64-generic) 39 | (firmware '()) 40 | 41 | (file-systems 42 | (cons* (file-system 43 | (device (file-system-label "Guix_image")) 44 | (mount-point "/") 45 | (type "ext4")) 46 | %guix-temproots 47 | %base-file-systems)) 48 | 49 | (users (cons (user-account 50 | (name "efraim") 51 | (comment "Efraim") 52 | (group "users") 53 | (home-directory "/home/efraim") 54 | (password "$6$4t79wXvnVk$bjwOl0YCkILfyWbr1BBxiPxJ0GJhdFrPdbBjndFjZpqHwd9poOpq2x5WtdWPWElK8tQ8rHJLg3mJ4ZfjrQekL1") 55 | (supplementary-groups '("wheel" 56 | "netdev" "kvm"))) 57 | %base-user-accounts)) 58 | 59 | (sudoers-file 60 | (plain-file "sudoers" 61 | (string-append (plain-file-content %sudoers-specification) 62 | (format #f "efraim ALL = NOPASSWD: ALL~%")))) 63 | 64 | ;; This is where we specify system-wide packages. 65 | (packages 66 | (append 67 | (map specification->package 68 | (list "screen")) 69 | (delete (specification->package "guix-icons") %base-packages))) 70 | 71 | (services 72 | (cons* (service openssh-service-type 73 | (openssh-configuration 74 | (openssh (specification->package "openssh-sans-x")) 75 | (authorized-keys 76 | `(("efraim" ,(local-file "Extras/efraim.pub")))))) 77 | 78 | (service tailscaled-service-type 79 | (tailscaled-configuration 80 | (package (specification->package "tailscale")))) 81 | 82 | (service mcron-service-type 83 | (mcron-configuration 84 | (jobs 85 | (list 86 | #~(job '(next-hour '(3)) 87 | "guix gc --free-space=15G") 88 | ;; The board powers up at unix date 0. 89 | ;; Restart ntpd regularly to set the clock. 90 | #~(job '(next-hour '(0 6 12 18)) 91 | "/run/current-system/profile/bin/herd restart ntpd"))))) 92 | 93 | (service ntp-service-type) 94 | 95 | (service dhcp-client-service-type) 96 | 97 | (service earlyoom-service-type 98 | (earlyoom-configuration 99 | (prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)") 100 | (avoid-regexp "guile"))) 101 | 102 | (service zram-device-service-type 103 | (zram-device-configuration 104 | (size (* 2 (expt 2 30))) 105 | (compression-algorithm 'zstd) 106 | (priority 100))) 107 | 108 | (modify-services 109 | %base-services 110 | (guix-service-type 111 | config => 112 | (guix-configuration 113 | (inherit config) 114 | (substitute-urls '()) ; Offload machine 115 | (authorized-keys %authorized-keys) 116 | (extra-options 117 | (cons* "--cores=2" 118 | "--cache-failures" 119 | %extra-options))))))) 120 | 121 | ;; Allow resolution of '.local' host names with mDNS. 122 | (name-service-switch %mdns-host-lookup-nss))) 123 | 124 | %pine64-system 125 | 126 | ;; guix system image --image-type=pine64-raw -L ~/workspace/my-guix/ -L ~/workspace/guix-config/ ~/workspace/guix-config/pine64.scm --system=aarch64-linux 127 | ;; guix system image --image-type=pine64-raw -L ~/workspace/my-guix/ -L ~/workspace/guix-config/ ~/workspace/guix-config/pine64.scm --target=aarch64-linux-gnu 128 | 129 | ;; sudo cfdisk /dev/sdX to resize /dev/sdX1 to use the remaining space left at the end of the µSD card 130 | ;; guix shell e2fsprogs -- sudo resize2fs /dev/sdX1 131 | ;; guix shell e2fsck-static -- sudo -E e2fsck /dev/sdX1 132 | -------------------------------------------------------------------------------- /pinebookpro.scm: -------------------------------------------------------------------------------- 1 | (define-module (pinebookpro)) 2 | (use-modules 3 | (gnu) 4 | (gnu system locale) 5 | (nongnu packages firmware) 6 | (nongnu packages linux) 7 | (config filesystems) 8 | (config guix-daemon) 9 | (dfsg contrib services tailscale) 10 | (srfi srfi-1)) 11 | (use-service-modules 12 | cups 13 | desktop 14 | dns 15 | linux 16 | mcron 17 | networking 18 | sddm 19 | ssh 20 | virtualization 21 | xorg) 22 | (use-package-modules 23 | cups 24 | firmware 25 | linux) 26 | 27 | (define %sway-keyboard-function-keys 28 | (mixed-text-file 29 | "keyboard-function-keys" 30 | ;; bindsym XF86Sleep 31 | "bindsym XF86MonBrightnessUp exec " (specification->package "brightnessctl") "/bin/brightnessctl set 5%+\n" 32 | "bindsym XF86MonBrightnessDown exec " (specification->package "brightnessctl") "/bin/brightnessctl set 5%-\n" 33 | ;; Fn + F3 doesn't register as a key 34 | "bindsym XF86AudioMute exec " (specification->package "pulseaudio") "/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle\n" 35 | "bindsym XF86AudioLowerVolume exec " (specification->package "pulseaudio") "/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%\n" 36 | "bindsym XF86AudioRaiseVolume exec " (specification->package "pulseaudio") "/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%\n" 37 | ;; Fn + F7 actually does stop the keyboard 38 | ;; bindsym Insert 39 | ;; bindsym Print 40 | ;; bindsym Num_Lock 41 | ;; bindsym Scroll_Lock 42 | ;; bindsym Pause 43 | ;; TODO? Remap power button 44 | )) 45 | 46 | (operating-system 47 | (host-name "pbp") 48 | (timezone "Asia/Jerusalem") 49 | (locale "en_IL.utf8") 50 | (locale-definitions 51 | (list (locale-definition (source "en_US") 52 | (name "en_US.UTF-8")) 53 | (locale-definition (source "he_IL") 54 | (name "he_IL.UTF-8")))) 55 | (keyboard-layout 56 | (keyboard-layout "us" "altgr-intl")) 57 | 58 | ;; Currently using tow-boot 59 | #;(bootloader 60 | (bootloader-configuration 61 | (bootloader u-boot-pinebook-pro-rk3399-bootloader) 62 | (targets '("/dev/mmcblk2")))) 63 | 64 | (bootloader 65 | (bootloader-configuration 66 | (bootloader grub-efi-removable-bootloader) 67 | (targets '("/boot/efi")) 68 | (keyboard-layout keyboard-layout))) 69 | 70 | (initrd-modules '()) 71 | ;(initrd-modules (list "nvme")) ; By default none. 72 | (kernel linux-arm64-generic) 73 | (firmware (list ap6256-firmware ath9k-htc-ar9271-firmware)) 74 | 75 | (file-systems 76 | (cons* (file-system 77 | (device (file-system-label "Guix_image")) 78 | (mount-point "/") 79 | (type "btrfs") 80 | (options "compress=zstd,discard,space_cache=v2")) 81 | (file-system 82 | (mount-point "/boot/efi") 83 | (device (file-system-label "GNU-ESP")) 84 | (type "vfat")) 85 | ;%tmp-tmpfs 86 | %guix-temproots 87 | %base-file-systems)) 88 | 89 | (users (cons* (user-account 90 | (name "efraim") 91 | (comment "Efraim Flashner") 92 | (group "users") 93 | (home-directory "/home/efraim") 94 | (supplementary-groups 95 | '("wheel" "netdev" "kvm" 96 | ;"lp" "lpadmin" ; CUPS 97 | ;"plugdev" 98 | "audio" "video"))) 99 | %base-user-accounts)) 100 | (packages 101 | (append 102 | (map specification->package 103 | (list "compsize" 104 | "guix-backgrounds" 105 | "guix-simplyblack-sddm-theme" ; sddm theme 106 | "xterm" 107 | 108 | "sway" 109 | "swayidle" 110 | "swaylock" 111 | 112 | "dunst" 113 | "i3status" 114 | "tofi")) 115 | %base-packages)) 116 | 117 | (services 118 | (cons* (service screen-locker-service-type 119 | (screen-locker-configuration 120 | (name "swaylock") 121 | (program (file-append (specification->package "swaylock") 122 | "/bin/swaylock")) 123 | (allow-empty-password? #f) 124 | (using-pam? #t) 125 | (using-setuid? #f))) 126 | 127 | (extra-special-file 128 | "/var/lib/alsa/asound.state" 129 | (local-file "Extras/pbp-asound.state")) 130 | 131 | (simple-service 'sway-kbd-fn-keys etc-service-type 132 | `(("sway/config.d/function-keys" 133 | ,%sway-keyboard-function-keys))) 134 | 135 | (service openssh-service-type 136 | (openssh-configuration 137 | (password-authentication? #t) 138 | (authorized-keys 139 | `(("efraim" ,(local-file "Extras/efraim.pub")))))) 140 | 141 | (service tailscaled-service-type 142 | (tailscaled-configuration 143 | (package (specification->package "tailscale")))) 144 | 145 | (service dnsmasq-service-type 146 | (dnsmasq-configuration 147 | (no-resolv? #t) 148 | (servers '("192.168.1.1" 149 | ;; Tailscale 150 | "/unicorn-typhon.ts.net/100.100.100.100" 151 | ;; OpenDNS servers 152 | "208.67.222.222" 153 | "208.67.220.220" 154 | "2620:119:35::35" 155 | "2620:119:53::53")))) 156 | 157 | (service tor-service-type 158 | (tor-configuration 159 | (hidden-services 160 | (list 161 | (tor-onion-service-configuration 162 | (name "ssh") 163 | (mapping '((22 "127.0.0.1:22")))))))) 164 | 165 | #;(service cups-service-type 166 | (cups-configuration 167 | (web-interface? #t) 168 | (default-paper-size "A4") 169 | (extensions 170 | (list cups-filters hplip-minimal)))) 171 | 172 | (service mcron-service-type 173 | (mcron-configuration 174 | (jobs (append 175 | %btrfs-defrag-var-guix 176 | (%btrfs-maintenance-jobs "/"))))) 177 | 178 | (service openntpd-service-type 179 | (openntpd-configuration 180 | (listen-on '("127.0.0.1" "::1")) 181 | (constraints-from '("https://www.google.com/")))) 182 | 183 | ;; This one seems to cause the boot process to hang. 184 | #;(service qemu-binfmt-service-type 185 | (qemu-binfmt-configuration 186 | ;; We get some architectures for free. 187 | (platforms 188 | (fold delete %qemu-platforms 189 | (lookup-qemu-platforms "arm" "aarch64"))))) 190 | 191 | (service earlyoom-service-type 192 | (earlyoom-configuration 193 | (prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)") 194 | (avoid-regexp "guile"))) 195 | 196 | (service zram-device-service-type 197 | (zram-device-configuration 198 | (size (* 4 (expt 2 30))) 199 | (compression-algorithm 'zstd) 200 | (priority 100))) 201 | 202 | (remove (lambda (service) 203 | (let ((type (service-kind service))) 204 | (or (memq type 205 | (list 206 | modem-manager-service-type 207 | ntp-service-type 208 | screen-locker-service-type)) 209 | (eq? 'network-manager-applet 210 | (service-type-name type))))) 211 | (modify-services 212 | %desktop-services 213 | (sddm-service-type 214 | config => 215 | (sddm-configuration 216 | (inherit config) 217 | (theme "guix-simplyblack-sddm") 218 | ;; This is failing since the update to sddm-0.20.0 219 | ;(display-server "wayland") 220 | (numlock "off"))) 221 | 222 | (guix-service-type 223 | config => 224 | (guix-configuration 225 | (inherit config) 226 | ;; Rely on btrfs compression. 227 | (log-compression 'none) 228 | (discover? #t) 229 | (substitute-urls %substitute-urls) 230 | (authorized-keys %authorized-keys) 231 | (extra-options 232 | (cons* "--cores=3" %extra-options)))))))) 233 | 234 | ;; Allow resolution of '.local' host names with mDNS. 235 | (name-service-switch %mdns-host-lookup-nss)) 236 | 237 | ;; guix system image --image-type=efi-raw -L ~/workspace/my-guix/ -L ~/workspace/guix-config/ ~/workspace/guix-config/pinebookpro.scm --system=aarch64-linux 238 | ;; sudo cfdisk /dev/sdX to resize /dev/sdX2 to use the remaining space left at the end of the µSD card 239 | ;; guix shell e2fsprogs -- sudo resize2fs /dev/sdX2 240 | ;; guix shell e2fsck-static -- sudo -E e2fsck /dev/sdX2 241 | ;; guix shell btrfs-progs -- sudo btrfs-convert -L /dev/sdX2 242 | -------------------------------------------------------------------------------- /rock64-deploy.scm: -------------------------------------------------------------------------------- 1 | (define-module (rock64-deploy)) 2 | (use-modules (rock64) 3 | (gnu machine) 4 | (gnu machine ssh)) 5 | 6 | (list (machine 7 | (operating-system %rock64-system) 8 | (environment managed-host-environment-type) 9 | (configuration (machine-ssh-configuration 10 | (host-name "rock64.unicorn-typhon.ts.net") 11 | ;(host-name "192.168.68.56") 12 | (system "aarch64-linux") 13 | (port 22) 14 | (user "efraim") 15 | (identity "/home/efraim/.ssh/id_ecdsa") 16 | (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP9kV+GUPVd13NudY7iQUPBsAmMQklSRUnIMRGmeXcos"))))) 17 | 18 | ;; For /etc/passwd 19 | ;; efraim ALL = NOPASSWD: ALL 20 | ;; time guix deploy -L ~/workspace/my-guix -L ~/workspace/guix-config ~/workspace/guix-config/rock64-deploy.scm 21 | -------------------------------------------------------------------------------- /rock64.scm: -------------------------------------------------------------------------------- 1 | (define-module (rock64)) 2 | (use-modules (guix packages) 3 | (gnu) 4 | (gnu bootloader u-boot) 5 | (gnu system locale) 6 | (config filesystems) 7 | (config guix-daemon) 8 | (dfsg contrib services tailscale) 9 | (srfi srfi-1)) 10 | (use-service-modules 11 | linux 12 | mcron 13 | networking 14 | ssh) 15 | (use-package-modules 16 | linux) 17 | (export %rock64-system) 18 | 19 | (define %rock64-system 20 | (operating-system 21 | (host-name "rock64") 22 | (timezone "Asia/Jerusalem") 23 | (locale "en_IL.utf8") 24 | (locale-definitions 25 | (list (locale-definition (source "en_US") 26 | (name "en_US.UTF-8")) 27 | (locale-definition (source "he_IL") 28 | (name "he_IL.UTF-8")))) 29 | (keyboard-layout 30 | (keyboard-layout "us" "altgr-intl")) 31 | 32 | (bootloader 33 | (bootloader-configuration 34 | (bootloader u-boot-rock64-rk3328-bootloader) 35 | (targets '("/dev/mmcblk0")))) ; SD card/eMMC (SD priority) storage 36 | 37 | (initrd-modules '()) 38 | (kernel linux-libre-arm64-generic) 39 | (firmware '()) 40 | 41 | (file-systems 42 | (cons* (file-system 43 | (device (file-system-label "Guix_image")) 44 | (mount-point "/") 45 | (type "btrfs")) 46 | %guix-temproots 47 | %base-file-systems)) 48 | 49 | (users (cons (user-account 50 | (name "efraim") 51 | (comment "Efraim") 52 | (group "users") 53 | (home-directory "/home/efraim") 54 | (password "$6$4t79wXvnVk$bjwOl0YCkILfyWbr1BBxiPxJ0GJhdFrPdbBjndFjZpqHwd9poOpq2x5WtdWPWElK8tQ8rHJLg3mJ4ZfjrQekL1") 55 | (supplementary-groups '("wheel" 56 | "netdev" "kvm"))) 57 | %base-user-accounts)) 58 | 59 | (sudoers-file 60 | (plain-file "sudoers" 61 | (string-append (plain-file-content %sudoers-specification) 62 | (format #f "efraim ALL = NOPASSWD: ALL~%")))) 63 | 64 | ;; This is where we specify system-wide packages. 65 | (packages 66 | (append 67 | (map specification->package 68 | (list "screen")) 69 | (delete (specification->package "guix-icons") %base-packages))) 70 | 71 | (services 72 | (cons* (service openssh-service-type 73 | (openssh-configuration 74 | (openssh (specification->package "openssh-sans-x")) 75 | (authorized-keys 76 | `(("efraim" ,(local-file "Extras/efraim.pub")))))) 77 | 78 | (service tailscaled-service-type 79 | (tailscaled-configuration 80 | (package (specification->package "tailscale")))) 81 | 82 | (service mcron-service-type 83 | (mcron-configuration 84 | (jobs 85 | (list 86 | #~(job '(next-hour '(3)) 87 | "guix gc --free-space=15G") 88 | ;; The board powers up at unix date 1453366264 (Jan 2016). 89 | ;; Restart ntpd regularly to set the clock. 90 | #~(job '(next-hour '(0 6 12 18)) 91 | "/run/current-system/profile/bin/herd restart ntpd"))))) 92 | 93 | (service ntp-service-type) 94 | 95 | (service dhcp-client-service-type) 96 | 97 | (service earlyoom-service-type 98 | (earlyoom-configuration 99 | (prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)") 100 | (avoid-regexp "guile"))) 101 | 102 | (service zram-device-service-type 103 | (zram-device-configuration 104 | (size (* 4 (expt 2 30))) 105 | (compression-algorithm 'zstd) 106 | (priority 100))) 107 | 108 | (modify-services 109 | %base-services 110 | (guix-service-type 111 | config => 112 | (guix-configuration 113 | (inherit config) 114 | (substitute-urls '()) ; Offload machine 115 | (authorized-keys %authorized-keys) 116 | (extra-options 117 | (cons* "--cores=3" 118 | "--cache-failures" 119 | %extra-options))))))) 120 | 121 | ;; Allow resolution of '.local' host names with mDNS. 122 | (name-service-switch %mdns-host-lookup-nss))) 123 | 124 | %rock64-system 125 | 126 | ;; guix system image --image-type=rock64-raw -L ~/workspace/my-guix -L ~/workspace/guix-config/ ~/workspace/guix-config/rock64.scm --system=aarch64-linux 127 | ;; guix system image --image-type=rock64-raw -L ~/workspace/my-guix -L ~/workspace/guix-config/ ~/workspace/guix-config/rock64.scm --target=aarch64-linux-gnu 128 | 129 | ;; sudo cfdisk /dev/sdX to resize /dev/sdX1 to use the remaining space left at the end of the µSD card 130 | ;; guix shell e2fsprogs -- sudo resize2fs /dev/sdX1 131 | ;; guix shell e2fsck-static -- sudo -E e2fsck /dev/sdX1 132 | -------------------------------------------------------------------------------- /sway-config: -------------------------------------------------------------------------------- 1 | # vim:filetype=swayconfig 2 | # Default config for sway 3 | # 4 | # Copy this to ~/.config/sway/config and edit it to your liking. 5 | # 6 | # Read `man 5 sway` for a complete reference. 7 | 8 | #exec export XDG_CURRENT_DESKTOP=sway 9 | #exec dbus-update-activation-environment XDG_CURRENT_DESKTOP 10 | 11 | ### Variables 12 | # 13 | # Logo key use Mod4. Use Mod1 for Alt. 14 | set $mod Mod4 15 | # Home row direction keys, like vim 16 | set $left h 17 | set $down j 18 | set $up k 19 | set $right l 20 | 21 | # Your preferred terminal emulator 22 | set $term alacritty 23 | 24 | # Your preferred application launcher 25 | # Note: pass the final command to swaymsg so that the resulting window can be opened 26 | # on the original workspace that the command was run on. 27 | #set $menu dmenu_path | dmenu | xargs swaymsg exec -- 28 | set $menu tofi-drun | xargs swaymsg exec -- 29 | 30 | set $swaylock '/run/current-system/profile/bin/swaylock --daemonize --indicator-radius 85 --ring-color 1a1a1a --key-hl-color ffb638 --image /run/current-system/profile/share/backgrounds/guix/guix-checkered-16-9.svg' 31 | 32 | ### Output configuration 33 | # 34 | # Default wallpaper (more are available in /run/current-system/profile/share/backgrounds) 35 | output * bg /run/current-system/profile/share/backgrounds/guix/guix-checkered-16-9.svg fill 36 | # 37 | # Example configuration: 38 | # 39 | # output HDMI-A-1 resolution 1920x1080 position 1920,0 40 | # 41 | # You can get the names of your outputs by running: swaymsg -t get_outputs 42 | 43 | output DVI-I-1 resolution 1920x1080 position 0,0 44 | output HDMI-A-1 resolution 1920x1080 position 1920,0 45 | 46 | ### Idle configuration 47 | # 48 | # Example configuration: 49 | # 50 | exec /run/current-system/profile/bin/swayidle -w \ 51 | timeout 300 $swaylock \ 52 | timeout 600 '/run/current-system/profile/bin/swaymsg "output * dpms off"' \ 53 | resume '/run/current-system/profile/bin/swaymsg "output * dpms on"' 54 | # 55 | # This will lock your screen after 300 seconds of inactivity, then turn off 56 | # your displays after another 300 seconds, and turn your screens back on when 57 | # resumed. It will also lock your screen before your computer goes to sleep. 58 | 59 | ### Input configuration 60 | # 61 | # Example configuration: 62 | # 63 | # input "2:14:SynPS/2_Synaptics_TouchPad" { 64 | # dwt enabled 65 | # tap enabled 66 | # natural_scroll enabled 67 | # middle_emulation enabled 68 | # } 69 | # 70 | # You can get the names of your inputs by running: swaymsg -t get_inputs 71 | # Read `man 5 sway-input` for more information about this section. 72 | 73 | input type:keyboard { 74 | xkb_numlock enabled 75 | xkb_layout "us,il" 76 | xkb_variant "altgr-intl," 77 | #Lalt + Lshift to switch languages, capslock->compose, Ralt for lvl 3, euro on e 78 | xkb_options "grp:lalt_lshift_toggle,compose:caps,lv3:ralt_switch,eurosign:e" 79 | } 80 | 81 | ### Key bindings 82 | # 83 | # Basics: 84 | # 85 | # Start a terminal 86 | bindsym $mod+Return exec $term 87 | 88 | # Kill focused window 89 | bindsym $mod+Shift+q kill 90 | 91 | # Start your launcher 92 | bindsym $mod+d exec $menu 93 | 94 | # Lock the screen 95 | bindsym $mod+Shift+x exec $swaylock 96 | 97 | # Drag floating windows by holding down $mod and left mouse button. 98 | # Resize them with right mouse button + $mod. 99 | # Despite the name, also works for non-floating windows. 100 | # Change normal to inverse to use left mouse button for resizing and right 101 | # mouse button for dragging. 102 | floating_modifier $mod normal 103 | 104 | # Reload the configuration file 105 | bindsym $mod+Shift+c reload 106 | 107 | # Exit sway (logs you out of your Wayland session) 108 | bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' 109 | # 110 | # Moving around: 111 | # 112 | # Move your focus around 113 | bindsym $mod+$left focus left 114 | bindsym $mod+$down focus down 115 | bindsym $mod+$up focus up 116 | bindsym $mod+$right focus right 117 | # Or use $mod+[up|down|left|right] 118 | bindsym $mod+Left focus left 119 | bindsym $mod+Down focus down 120 | bindsym $mod+Up focus up 121 | bindsym $mod+Right focus right 122 | 123 | # Move the focused window with the same, but add Shift 124 | bindsym $mod+Shift+$left move left 125 | bindsym $mod+Shift+$down move down 126 | bindsym $mod+Shift+$up move up 127 | bindsym $mod+Shift+$right move right 128 | # Ditto, with arrow keys 129 | bindsym $mod+Shift+Left move left 130 | bindsym $mod+Shift+Down move down 131 | bindsym $mod+Shift+Up move up 132 | bindsym $mod+Shift+Right move right 133 | 134 | # Move between workspaces 135 | bindsym $mod+Alt+$left workspace prev 136 | bindsym $mod+Alt+$right workspace next 137 | bindsym $mod+Alt+Left workspace prev 138 | bindsym $mod+Alt+Right workspace next 139 | # 140 | # Workspaces: 141 | # 142 | # Switch to workspace 143 | bindsym $mod+1 workspace number 1 144 | bindsym $mod+2 workspace number 2 145 | bindsym $mod+3 workspace number 3 146 | bindsym $mod+4 workspace number 4 147 | bindsym $mod+5 workspace number 5 148 | bindsym $mod+6 workspace number 6 149 | bindsym $mod+7 workspace number 7 150 | bindsym $mod+8 workspace number 8 151 | bindsym $mod+9 workspace number 9 152 | bindsym $mod+0 workspace number 10 153 | # Move focused container to workspace 154 | bindsym $mod+Shift+1 move container to workspace number 1 155 | bindsym $mod+Shift+2 move container to workspace number 2 156 | bindsym $mod+Shift+3 move container to workspace number 3 157 | bindsym $mod+Shift+4 move container to workspace number 4 158 | bindsym $mod+Shift+5 move container to workspace number 5 159 | bindsym $mod+Shift+6 move container to workspace number 6 160 | bindsym $mod+Shift+7 move container to workspace number 7 161 | bindsym $mod+Shift+8 move container to workspace number 8 162 | bindsym $mod+Shift+9 move container to workspace number 9 163 | bindsym $mod+Shift+0 move container to workspace number 10 164 | # Note: workspaces can have any name you want, not just numbers. 165 | # We just use 1-10 as the default. 166 | # 167 | # Layout stuff: 168 | # 169 | # You can "split" the current object of your focus with 170 | # $mod+b or $mod+v, for horizontal and vertical splits 171 | # respectively. 172 | bindsym $mod+b split horizontal 173 | bindsym $mod+v split vertical 174 | 175 | # Switch the current container between different layout styles 176 | bindsym $mod+s layout stacking 177 | bindsym $mod+w layout tabbed 178 | bindsym $mod+e layout toggle split 179 | 180 | # Make the current focus fullscreen 181 | bindsym $mod+f fullscreen 182 | 183 | # Toggle the current focus between tiling and floating mode 184 | bindsym $mod+Shift+space floating toggle 185 | 186 | # Swap focus between the tiling area and the floating area 187 | bindsym $mod+space focus mode_toggle 188 | 189 | # Move focus to the parent container 190 | bindsym $mod+a focus parent 191 | # 192 | # Scratchpad: 193 | # 194 | # Sway has a "scratchpad", which is a bag of holding for windows. 195 | # You can send windows there and get them back later. 196 | 197 | # Move the currently focused window to the scratchpad 198 | bindsym $mod+Shift+minus move scratchpad 199 | 200 | # Show the next scratchpad window or hide the focused scratchpad window. 201 | # If there are multiple scratchpad windows, this command cycles through them. 202 | bindsym $mod+minus scratchpad show 203 | # 204 | # Resizing containers: 205 | # 206 | mode "resize" { 207 | # left will shrink the containers width 208 | # right will grow the containers width 209 | # up will shrink the containers height 210 | # down will grow the containers height 211 | bindsym $left resize shrink width 10px 212 | bindsym $down resize grow height 10px 213 | bindsym $up resize shrink height 10px 214 | bindsym $right resize grow width 10px 215 | 216 | # Ditto, with arrow keys 217 | bindsym Left resize shrink width 10px 218 | bindsym Down resize grow height 10px 219 | bindsym Up resize shrink height 10px 220 | bindsym Right resize grow width 10px 221 | 222 | # Return to default mode 223 | bindsym Return mode "default" 224 | bindsym Escape mode "default" 225 | } 226 | bindsym $mod+r mode "resize" 227 | 228 | # 229 | # Status Bar: 230 | # 231 | # Read `man 5 sway-bar` for more information about this section. 232 | bar { 233 | position top 234 | 235 | # When the status_command prints a new line to stdout, swaybar updates. 236 | # The default just shows the current date and time. 237 | #status_command while date --rfc-email; do sleep 1; done 238 | status_command /run/current-system/profile/bin/i3status 239 | 240 | colors { 241 | statusline #ffffff 242 | background #323232 243 | inactive_workspace #32323200 #32323200 #5c5c5c 244 | } 245 | } 246 | 247 | for_window [app_id="imv"] floating enable 248 | for_window [app_id="mpv"] floating enable 249 | for_window [title = "KeePassXC - Access Request"] floating enable 250 | for_window [title = "IceCat — Sharing Indicator"] floating enable 251 | for_window [title = "Join Channel"] floating enable 252 | #for_window [window_type="dialog"] floating enable 253 | #for_window [window_role="dialog"] floating enable 254 | 255 | include /run/current-system/profile/etc/sway/config.d/* 256 | include /etc/sway/config.d/* 257 | 258 | exec dbus-update-activation-environment DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway 259 | -------------------------------------------------------------------------------- /tofi-config: -------------------------------------------------------------------------------- 1 | # Default config for tofi 2 | # 3 | # Copy this file to ~/.config/tofi/config and get customising! 4 | # 5 | # A complete reference of available options can be found in `man 5 tofi`. 6 | 7 | # 8 | ### Fonts 9 | # 10 | # Font to use, either a path to a font file or a name. 11 | # 12 | # If a path is given, tofi will startup much quicker, but any 13 | # characters not in the chosen font will fail to render. 14 | # 15 | # Otherwise, fonts are interpreted in Pango format. 16 | font = "Sans" 17 | 18 | # Point size of text. 19 | font-size = 24 20 | 21 | # Comma separated list of OpenType font feature settings to apply, 22 | # if supported by the chosen font. The format is similar to the CSS 23 | # "font-feature-settings" property. 24 | # 25 | # Examples: 26 | # 27 | # font-features = "smcp, c2sc" (all small caps) 28 | # font-features = "liga 0" (disable ligatures) 29 | font-features = "" 30 | 31 | # Comma separated list of OpenType font variation settings to apply 32 | # to variable fonts. The format is similar to the CSS 33 | # "font-variation-settings" property. 34 | # 35 | # Examples: 36 | # 37 | # font-variations = "wght 900" (Extra bold) 38 | # font-variations = "wdth 25, slnt -10" (Narrow and slanted) 39 | font-variations = "" 40 | 41 | # Perform font hinting. Only applies when a path to a font has been 42 | # specified via `font`. Disabling font hinting speeds up text 43 | # rendering appreciably, but will likely look poor at small font pixel 44 | # sizes. 45 | hint-font = true 46 | 47 | # 48 | ### Text theming 49 | # 50 | # Default text color 51 | # 52 | # All text defaults to this color if not otherwise specified. 53 | text-color = #FFFFFF 54 | 55 | # All pieces of text have the same theming attributes available: 56 | # 57 | # *-color 58 | # Foreground color 59 | # 60 | # *-background 61 | # Background color 62 | # 63 | # *-background-padding 64 | # Background padding in pixels (comma-delimited, CSS-style list). 65 | # See "DIRECTIONAL VALUES" under `man 5 tofi` for more info. 66 | # 67 | # *-background-corner-radius 68 | # Radius of background box corners in pixels 69 | 70 | # Prompt text theme 71 | # prompt-color = #FFFFFF 72 | prompt-background = #00000000 73 | prompt-background-padding = 0 74 | prompt-background-corner-radius = 0 75 | 76 | # Placeholder text theme 77 | placeholder-color = #FFFFFFA8 78 | placeholder-background = #00000000 79 | placeholder-background-padding = 0 80 | placeholder-background-corner-radius = 0 81 | 82 | # Input text theme 83 | # input-color = #FFFFFF 84 | input-background = #00000000 85 | input-background-padding = 0 86 | input-background-corner-radius = 0 87 | 88 | # Default result text theme 89 | # default-result-color = #FFFFFF 90 | default-result-background = #00000000 91 | default-result-background-padding = 0 92 | default-result-background-corner-radius = 0 93 | 94 | # Alternate (even-numbered) result text theme 95 | # 96 | # If unspecified, these all default to the corresponding 97 | # default-result-* attribute. 98 | # 99 | # alternate-result-color = #FFFFFF 100 | # alternate-result-background = #00000000 101 | # alternate-result-background-padding = 0 102 | # alternate-result-background-corner-radius = 0 103 | 104 | # Selection text 105 | selection-color = #F92672 106 | selection-background = #00000000 107 | selection-background-padding = 0 108 | selection-background-corner-radius = 0 109 | 110 | # Matching portion of selection text 111 | selection-match-color = #00000000 112 | 113 | 114 | # 115 | ### Text cursor theme 116 | # 117 | # Style of the optional text cursor. 118 | # 119 | # Supported values: bar, block, underscore 120 | text-cursor-style = bar 121 | 122 | # Color of the text cursor 123 | # 124 | # If unspecified, defaults to the same as input-color 125 | # text-cursor-color = #FFFFFF 126 | 127 | # Color of text behind the text cursor when text-cursor-style = block 128 | # 129 | # If unspecified, defaults to the same as background-color 130 | # text-cursor-background = #000000 131 | 132 | # Corner radius of the text cursor 133 | text-cursor-corner-radius = 0 134 | 135 | # Thickness of the bar and underscore text cursors. 136 | # 137 | # If unspecified, defaults to a font-dependent value when 138 | # text-cursor-style = underscore, or to 2 otherwise. 139 | # text-cursor-thickness = 2 140 | 141 | # 142 | ### Text layout 143 | # 144 | # Prompt to display. 145 | prompt-text = "run: " 146 | 147 | # Extra horizontal padding between prompt and input. 148 | prompt-padding = 0 149 | 150 | # Placeholder input text. 151 | placeholder-text = "" 152 | 153 | # Maximum number of results to display. 154 | # If 0, tofi will draw as many results as it can fit in the window. 155 | num-results = 0 156 | 157 | # Spacing between results in pixels. Can be negative. 158 | result-spacing = 0 159 | 160 | # List results horizontally. 161 | horizontal = false 162 | 163 | # Minimum width of input in horizontal mode. 164 | min-input-width = 0 165 | 166 | # 167 | ### Window theming 168 | # 169 | # Width and height of the window. Can be pixels or a percentage. 170 | width = 1280 171 | height = 720 172 | 173 | # Window background color 174 | background-color = #1B1D1E 175 | 176 | # Width of the border outlines in pixels. 177 | outline-width = 4 178 | 179 | # Border outline color 180 | outline-color = #080800 181 | 182 | # Width of the border in pixels. 183 | border-width = 12 184 | 185 | # Border color 186 | border-color = #F92672 187 | 188 | # Radius of window corners in pixels. 189 | corner-radius = 0 190 | 191 | # Padding between borders and text. Can be pixels or a percentage. 192 | padding-top = 8 193 | padding-bottom = 8 194 | padding-left = 8 195 | padding-right = 8 196 | 197 | # Whether to clip text drawing to be within the specified padding. This 198 | # is mostly important for allowing text to be inset from the border, 199 | # while still allowing text backgrounds to reach right to the edge. 200 | clip-to-padding = true 201 | 202 | # Whether to scale the window by the output's scale factor. 203 | scale = true 204 | 205 | # 206 | ### Window positioning 207 | # 208 | # The name of the output to appear on. An empty string will use the 209 | # default output chosen by the compositor. 210 | output = "" 211 | 212 | # Location on screen to anchor the window to. 213 | # 214 | # Supported values: top-left, top, top-right, right, bottom-right, 215 | # bottom, bottom-left, left, center. 216 | anchor = center 217 | 218 | # Set the size of the exclusive zone. 219 | # 220 | # A value of -1 means ignore exclusive zones completely. 221 | # A value of 0 will move tofi out of the way of other windows' zones. 222 | # A value greater than 0 will set that much space as an exclusive zone. 223 | # 224 | # Values greater than 0 are only meaningful when tofi is anchored to a 225 | # single edge. 226 | exclusive-zone = -1 227 | 228 | # Window offset from edge of screen. Only has an effect when anchored 229 | # to the relevant edge. Can be pixels or a percentage. 230 | margin-top = 0 231 | margin-bottom = 0 232 | margin-left = 0 233 | margin-right = 0 234 | 235 | # 236 | ### Behaviour 237 | # 238 | # Hide the mouse cursor. 239 | hide-cursor = false 240 | 241 | # Show a text cursor in the input field. 242 | text-cursor = false 243 | 244 | # Sort results by number of usages in run and drun modes. 245 | history = true 246 | 247 | # Specify an alternate file to read and store history information 248 | # from / to. This shouldn't normally be needed, and is intended to 249 | # facilitate the creation of custom modes. 250 | # history-file = /path/to/histfile 251 | 252 | # Use fuzzy matching for searches. 253 | fuzzy-match = false 254 | 255 | # If true, require a match to allow a selection to be made. If false, 256 | # making a selection with no matches will print input to stdout. 257 | # In drun mode, this is always true. 258 | require-match = true 259 | 260 | # If true, automatically accept a result if it is the only one 261 | # remaining. If there's only one result on startup, window creation is 262 | # skipped altogether. 263 | auto-accept-single = false 264 | 265 | # If true, typed input will be hidden, and what is displayed (if 266 | # anything) is determined by the hidden-character option. 267 | hide-input = false 268 | 269 | # Replace displayed input characters with a character. If the empty 270 | # string is given, input will be completely hidden. 271 | # This option only has an effect when hide-input is set to true. 272 | hidden-character = "*" 273 | 274 | # If true, directly launch applications on selection when in drun mode. 275 | # Otherwise, just print the command line to stdout. 276 | drun-launch = false 277 | 278 | # The terminal to run terminal programs in when in drun mode. 279 | # This option has no effect if drun-launch is set to true. 280 | # Defaults to the value of the TERMINAL environment variable. 281 | # terminal = foot 282 | 283 | # Delay keyboard initialisation until after the first draw to screen. 284 | # This option is experimental, and will cause tofi to miss keypresses 285 | # for a short time after launch. The only reason to use this option is 286 | # performance on slow systems. 287 | late-keyboard-init = false 288 | 289 | # If true, allow multiple simultaneous processes. 290 | # If false, create a lock file on startup to prevent multiple instances 291 | # from running simultaneously. 292 | multi-instance = false 293 | 294 | # Assume input is plain ASCII, and disable some Unicode handling 295 | # functions. This is faster, but means e.g. a search for "e" will not 296 | # match "é". 297 | ascii-input = false 298 | 299 | # 300 | ### Inclusion 301 | # 302 | # Configs can be split between multiple files, and then included 303 | # within each other. 304 | # include = /path/to/config 305 | -------------------------------------------------------------------------------- /unmatched-deploy.scm: -------------------------------------------------------------------------------- 1 | (define-module (unmatched-deploy)) 2 | (use-modules (unmatched) 3 | (gnu machine) 4 | (gnu machine ssh)) 5 | 6 | (list (machine 7 | (operating-system %unmatched-system) 8 | (environment managed-host-environment-type) 9 | (configuration (machine-ssh-configuration 10 | (host-name "unmatched.unicorn-typhon.ts.net") 11 | ;(host-name "192.168.68.54") 12 | (system "riscv64-linux") 13 | (port 22) 14 | (user "efraim") 15 | (identity "/home/efraim/.ssh/id_ecdsa") 16 | (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKEiKUe+U6TENWhAhU8cIq9/y/SLdt3XMbrrIJvp3Ix6"))))) 17 | 18 | ;; For /etc/passwd 19 | ;; efraim ALL = NOPASSWD: ALL 20 | ;; time guix deploy -L ~/workspace/my-guix -L ~/workspace/guix-config ~/workspace/guix-config/unmatched-deploy.scm 21 | -------------------------------------------------------------------------------- /unmatched.scm: -------------------------------------------------------------------------------- 1 | (define-module (unmatched)) 2 | (use-modules (guix packages) 3 | (guix utils) 4 | (gnu) 5 | (gnu bootloader u-boot) 6 | (gnu system locale) 7 | (config filesystems) 8 | (config guix-daemon) 9 | (dfsg contrib services tailscale) 10 | (srfi srfi-1)) 11 | (use-service-modules 12 | linux 13 | networking 14 | ssh) 15 | (use-package-modules 16 | gcc 17 | linux) 18 | (export %unmatched-system) 19 | 20 | ;; OS starts from here: 21 | 22 | (define %unmatched-system 23 | (operating-system 24 | (host-name "unmatched") 25 | (timezone "Asia/Jerusalem") 26 | (locale "en_IL.utf8") 27 | (locale-definitions 28 | (list (locale-definition (source "en_US") 29 | (name "en_US.UTF-8")) 30 | (locale-definition (source "he_IL") 31 | (name "he_IL.UTF-8")))) 32 | (keyboard-layout 33 | (keyboard-layout "us" "altgr-intl")) 34 | 35 | (bootloader (bootloader-configuration 36 | (bootloader u-boot-sifive-unmatched-bootloader) 37 | (targets '("/dev/mmcblk0")))) ; SD card/eMMC (SD priority) storage 38 | 39 | (firmware '()) 40 | (initrd-modules '()) 41 | (kernel linux-libre-riscv64-generic) 42 | 43 | (file-systems 44 | (cons* (file-system 45 | (device (file-system-label "Guix_image")) 46 | (mount-point "/") 47 | (type "ext4")) 48 | %guix-temproots 49 | %base-file-systems)) 50 | 51 | (users (cons* (user-account 52 | (name "efraim") 53 | (comment "Efraim Flashner") 54 | (group "users") 55 | (home-directory "/home/efraim") 56 | (password "$6$4t79wXvnVk$bjwOl0YCkILfyWbr1BBxiPxJ0GJhdFrPdbBjndFjZpqHwd9poOpq2x5WtdWPWElK8tQ8rHJLg3mJ4ZfjrQekL1") 57 | (supplementary-groups '("wheel" "netdev" "kvm"))) 58 | %base-user-accounts)) 59 | 60 | (sudoers-file 61 | (plain-file "sudoers" 62 | (string-append (plain-file-content %sudoers-specification) 63 | (format #f "efraim ALL = NOPASSWD: ALL~%")))) 64 | 65 | ;; This is where we specify system-wide packages. 66 | (packages 67 | (append 68 | (map specification->package 69 | (list "screen")) 70 | (delete (specification->package "guix-icons") %base-packages))) 71 | 72 | (services 73 | (cons* (service openssh-service-type 74 | (openssh-configuration 75 | (openssh (specification->package "openssh-sans-x")) 76 | (authorized-keys 77 | `(("efraim" ,(local-file "Extras/efraim.pub")))))) 78 | 79 | (service tailscaled-service-type 80 | (tailscaled-configuration 81 | (package (specification->package "tailscale")) 82 | (dev-net-tun? #f))) 83 | 84 | (service openntpd-service-type 85 | (openntpd-configuration 86 | (listen-on '("127.0.0.1" "::1")) 87 | ;; Prevent moving to year 2116. 88 | (constraints-from '("https://www.google.com/")))) 89 | 90 | (service dhcp-client-service-type) 91 | 92 | (service earlyoom-service-type 93 | (earlyoom-configuration 94 | (earlyoom 95 | (package 96 | (inherit earlyoom) 97 | (native-inputs 98 | ;; Almost any version of go will work here. 99 | (modify-inputs (package-native-inputs earlyoom) 100 | (replace "go" gccgo-12))))) 101 | (prefer-regexp "(cc1(plus)?|.rustc-real|Web Content)") 102 | (avoid-regexp "guile"))) 103 | 104 | (service zram-device-service-type 105 | (zram-device-configuration 106 | (size (* 8 (expt 2 30))) 107 | (compression-algorithm 'zstd) 108 | (priority 100))) 109 | 110 | (modify-services 111 | %base-services 112 | (guix-service-type 113 | config => 114 | (guix-configuration 115 | (inherit config) 116 | ;; If there's no substitute for guix then skip the tests. 117 | ;; Uncomment or comment out this block as needed. 118 | (guix 119 | (let ((base (specification->package "guix"))) 120 | (package 121 | (inherit base) 122 | (arguments 123 | (substitute-keyword-arguments (package-arguments base) 124 | ((#:tests? _ #f) #f)))))) 125 | (substitute-urls '()) ; Offload machine 126 | (authorized-keys %authorized-keys) 127 | (extra-options 128 | (cons* "--cache-failures" %extra-options))))))) 129 | 130 | ;; Allow resolution of '.local' host names with mDNS. 131 | (name-service-switch %mdns-host-lookup-nss))) 132 | 133 | %unmatched-system 134 | 135 | ;; guix system image --image-type=unmatched-raw -L ~/workspace/my-guix -L ~/workspace/guix-config/ ~/workspace/guix-config/unmatched.scm --system=riscv64-linux 136 | -------------------------------------------------------------------------------- /vim/after/ftplugin/gitcommit.vim: -------------------------------------------------------------------------------- 1 | setlocal spell 2 | setlocal expandtab 3 | setlocal tabstop=2 autoindent 4 | 5 | " wrap text and highlight columns 6 | setlocal textwidth=72 7 | setlocal colorcolumn=50,72 8 | -------------------------------------------------------------------------------- /vim/after/ftplugin/guix.vim: -------------------------------------------------------------------------------- 1 | let b:dispatch = guix_binary . ' build ' . guix_build_options . ' ' 2 | " We might be working on a go program 3 | set wildignore-=*.go 4 | -------------------------------------------------------------------------------- /vim/after/ftplugin/mail.vim: -------------------------------------------------------------------------------- 1 | setlocal spell 2 | setlocal expandtab 3 | setlocal tabstop=2 autoindent 4 | 5 | setlocal colorcolumn=72 6 | -------------------------------------------------------------------------------- /vim/after/ftplugin/scheme.vim: -------------------------------------------------------------------------------- 1 | " size of an "indent" 2 | set shiftwidth=4 3 | " a combination of spaces and tabs are used to simulate tab stops at a width 4 | " other than the (hard)tabstop 5 | set softtabstop=4 6 | " size of a hard tabstop 7 | set tabstop=4 8 | " always uses spaces instead of tab characters 9 | set expandtab 10 | " Ignore .go files 11 | set wildignore+=*.go 12 | -------------------------------------------------------------------------------- /vim/after/ftplugin/text.vim: -------------------------------------------------------------------------------- 1 | setlocal spell 2 | setlocal expandtab 3 | setlocal tabstop=2 autoindent 4 | -------------------------------------------------------------------------------- /vim/spell/en.utf-8.add: -------------------------------------------------------------------------------- 1 | Efraim 2 | Flashner 3 | אפרים 4 | פלשנר 5 | Guix 6 | FOSDEM 7 | aarch64 8 | -------------------------------------------------------------------------------- /vim/spell/en.utf-8.add.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Millak/guix-config/be6f242b1365882b44946b4b058932d274e5f318/vim/spell/en.utf-8.add.spl -------------------------------------------------------------------------------- /vim/spell/he.utf-8.add: -------------------------------------------------------------------------------- 1 | אפרים 2 | פלשנר 3 | -------------------------------------------------------------------------------- /vim/vimrc: -------------------------------------------------------------------------------- 1 | " Start by using the defaults. 2 | source $VIMRUNTIME/defaults.vim 3 | set mouse& " NO MOUSE 4 | 5 | set background=dark " default light 6 | set number 7 | 8 | if getenv('XDG_CACHE_HOME') != v:null 9 | let &g:directory=getenv('XDG_CACHE_HOME') 10 | "elseif getenv('XDG_RUNTIME_DIR') != v:null 11 | " let &g:directory=getenv('XDG_RUNTIME_DIR') 12 | else 13 | let &g:directory=getenv('HOME') . '/.cache' 14 | endif 15 | let &g:undodir=&g:directory . '/vim/undodir//' 16 | let &g:backupdir=&g:directory . '/vim/backupdir//' 17 | if !isdirectory(expand(&g:backupdir)) 18 | silent! call mkdir(expand(&g:backupdir), 'p', 0700) 19 | endif 20 | if !isdirectory(expand(&g:undodir)) 21 | silent! call mkdir(expand(&g:undodir), 'p', 0700) 22 | endif 23 | 24 | set undofile 25 | set backup 26 | set showmode 27 | 28 | " size of an "indent", for autoidentation 29 | set shiftwidth=4 " default 8 30 | " combo of spaces and tabs to simulate tab stops at a width other than the (hard)tabstop 31 | set softtabstop=4 " default 0 32 | " size of hard tabstop 33 | set tabstop=4 " default 8 34 | " always uses spaces instead of tab characters 35 | set expandtab 36 | 37 | set formatoptions+=j " Delete comment character when joining commented lines 38 | 39 | set shiftround 40 | set autoindent 41 | set smartindent 42 | 43 | set laststatus=2 " default 1 44 | set noincsearch " change is hard 45 | 46 | set visualbell 47 | 48 | " invisible characters; toggle with 'set list!' 49 | set listchars=tab:▸\ ,trail:▸,eol:¬ " default eol:$ 50 | set list 51 | 52 | " highlight the column the cursor is on 53 | " set cursorcolumn 54 | 55 | " speling is hard 56 | iab teh the 57 | iab THe The 58 | iab THis This 59 | iab taht that 60 | iab definately definitely 61 | iab pacakges packages 62 | iab UPdate Update 63 | iab compatability compatibility 64 | 65 | highlight ExtraWhitespace term=inverse cterm=inverse gui=inverse 66 | " Show trailing whitespace and spaces before tabs 67 | autocmd Syntax * syn match ExtraWhitespace /\s+$\| \+\ze\t/ containedin=ALL 68 | 69 | " Per-project `.exrc' files. We enumerate them here because they're a 70 | " security risk. 71 | let use_local_vimrc = [ 72 | \ '/home/efraim/workspace/guix', 73 | \ '/home/efraim/workspace/guix-bioinformatics', 74 | \ '/home/efraim/workspace/guix-past', 75 | \ '/home/efraim/workspace/guix-rust-team', 76 | \ '/home/efraim/workspace/my-guix'] 77 | " This only checks the directory of the current window. 78 | if index(use_local_vimrc, getcwd()) >=0 79 | set secure exrc 80 | endif 81 | 82 | 83 | " also located in ~/.vim/after/ftplugin 84 | "autocmd FileType gitcommit setlocal spell 85 | "autocmd FileType mail setlocal spell 86 | "autocmd FileType text setlocal spell 87 | "autocmd FileType scheme setlocal shiftwidth=4 softtabstop=4 tabstop=4 expandtab 88 | "autocmd Filetype guix let b:dispatch = guix_binary . ' build ' . guix_build_options . ' ' 89 | 90 | let g:markdown_fenced_languages = ['diff', 'html', 'scheme', 'vim'] 91 | 92 | " Slime.vim 93 | " TODO: add fallback to no XDG_RUNTIME_DIR 94 | let g:slime_paste_file = getenv('XDG_RUNTIME_DIR') . "/.slime_paste" 95 | 96 | " Airline.vim 97 | let g:airline#extensions#tabline#enabled = 1 98 | 99 | " EditorConfig 100 | if has('syntax') && has('eval') && filereadable('.editorconfig') 101 | packadd! editorconfig 102 | endif 103 | 104 | " Guix.vim 105 | let g:guix_binary = "/home/efraim/workspace/guix/pre-inst-env guix " 106 | let g:guix_build_options = "-L /home/efraim/workspace/my-guix -L /home/efraim/workspace/guix-config" 107 | let g:guix_build_options_work = "-L /home/efraim/workspace/guix-past/modules -L /home/efraim/workspace/guix-bioinformatics -L /home/efraim/workspace/guix-science" 108 | 109 | " gtags.vim 110 | set cscopetag 111 | set cscopeprg=gtags-cscope " from global 112 | call setenv('GTAGSLABEL', 'pygments') 113 | -------------------------------------------------------------------------------- /visionfive1.scm: -------------------------------------------------------------------------------- 1 | (define-module (visionfive1)) 2 | (use-modules (guix packages) 3 | (gnu) 4 | (gnu bootloader grub) 5 | (gnu bootloader u-boot) 6 | (gnu bootloader extlinux) 7 | (gnu system locale) 8 | (config filesystems) 9 | (config guix-daemon) 10 | (srfi srfi-1)) 11 | (use-service-modules 12 | linux 13 | mcron 14 | networking 15 | ssh) 16 | (use-package-modules 17 | connman 18 | linux) 19 | 20 | ;; To prepare the disk: (from gptfdisk) 21 | ;;sgdisk -g --clear --set-alignment=1 \ 22 | ;; --new=1:0:+1M: \ 23 | ;; --new=2:0:+100M: --typecode=2:EF00 \ 24 | ;; --new=3:0:-1M: --attributes 3:set:2 -d 1 \ 25 | ;; [block device] 26 | 27 | (use-modules (gnu packages bootloaders) 28 | (guix utils) 29 | (guix git-download)) 30 | 31 | ;; Some 40ish commits on top of upstream u-boot 2022.04-rc2 32 | (define u-boot-starfive-visionfive 33 | (let ((base (make-u-boot-package "starfive_jh7100_visionfive_smode" "riscv64-linux-gnu"))) 34 | (package 35 | (inherit base) 36 | (version "VF_SDK_510_V1.2.1") 37 | (source (origin 38 | (method git-fetch) 39 | (uri (git-reference 40 | (url "https://github.com/starfive-tech/u-boot") 41 | (commit version))) 42 | (file-name (git-file-name "starfive-visionfive-u-boot" version)) 43 | (sha256 44 | (base32 45 | "0brywkh2ppqqhpjhr3n6w0flf31sbmbgy6rbpdczdl1mrav44l8n")))) 46 | (arguments 47 | (substitute-keyword-arguments (package-arguments base) 48 | ((#:phases phases) 49 | #~(modify-phases #$phases 50 | ;; We're building with openssl included :/ 51 | (delete 'disable-tools-libcrypto) 52 | (add-after 'unpack 'set-environment 53 | (lambda* (#:key inputs #:allow-other-keys) 54 | (setenv "OPENSBI" (search-input-file inputs 55 | "fw_dynamic.bin")))))))) 56 | (inputs 57 | (modify-inputs (package-inputs base) 58 | (append (specification->package "opensbi-generic") 59 | (specification->package "openssl"))))))) 60 | 61 | ;; This is a placeholder!! 62 | (define install-starfive-visionfive-u-boot 63 | #~(lambda (bootloader root-index image) 64 | (let ((spl (string-append bootloader "/libexec/spl/u-boot-spl.bin")) 65 | (u-boot (string-append bootloader "/libexec/u-boot.itb"))) 66 | ;; https://source.denx.de/u-boot/u-boot/-/blob/master/doc/board/sifive/unmatched.rst 67 | (write-file-on-device spl (stat:size (stat spl)) 68 | image (* 34 512)) 69 | (write-file-on-device u-boot (stat:size (stat u-boot)) 70 | image (* 2082 512))))) 71 | 72 | (define u-boot-starfive-visionfive-bootloader 73 | (bootloader 74 | (inherit u-boot-bootloader) 75 | (package u-boot-starfive-visionfive) 76 | ;(disk-image-installer install-starfive-visionfive-u-boot))) 77 | (disk-image-installer #~(lambda _ #t)))) 78 | 79 | ;; 80 | 81 | ;; The kernel is based on Linus' 6.4-rc2 branch, with about 50 patches waiting 82 | ;; to be upstreamed. 83 | 84 | (define %starfive-kernel-version "JH7110_VisionFive2_upstream") 85 | (define %starfive-kernel-hash 86 | (base32 "19iqijvrsd4p9vmskl74mi2yw46kz02d6a7d1vap79gd0py3bmgq")) 87 | (define %starfive-kernel-source 88 | (origin 89 | (method git-fetch) 90 | (uri (git-reference 91 | (url "https://github.com/starfive-tech/linux") 92 | (commit %starfive-kernel-version))) 93 | (file-name (git-file-name "linux-kernel-for-starfive" "6.4-rc2+49patches")) 94 | (sha256 %starfive-kernel-hash))) 95 | 96 | (define starfive-kernel 97 | (let ((base ((@@ (gnu packages linux) make-linux-libre*) 98 | "6.4-rc2+49patches" 99 | "gnu" 100 | %starfive-kernel-source 101 | '("riscv64-linux") 102 | ;#:defconfig "visionfive_defconfig" 103 | ;#:defconfig "starfive_jh7100_fedora_defconfig" 104 | #:extra-version "starfive"))) 105 | (package 106 | (inherit base) 107 | ;; This doesn't seem to make a difference. 108 | ;(source %starfive-visionfive1-kernel-source) 109 | ))) 110 | 111 | 112 | ;; for /boot/uEnv.txt 113 | (define %uenv.txt 114 | (mixed-text-file 115 | "uEnv.txt" 116 | "\ 117 | fdt_high=0xffffffffffffffff 118 | initrd_high=0xffffffffffffffff 119 | kernel_addr_r=0x84000000 120 | kernel_comp_addr_r=0x90000000 121 | kernel_comp_size=0x10000000 122 | fdt_addr_r=0x88000000 123 | ramdisk_addr_r=0x88300000 124 | # Move DHCP after MMC to speed up booting 125 | boot_targets=mmc0 dhcp 126 | # Fix wrong fdtfile name 127 | fdtfile=" starfive-kernel "/lib/dtbs/starfive/jh7100-starfive-visionfive-v1.dtb 128 | # Fix missing bootcmd 129 | bootcmd=run distro_bootcmd")) 130 | 131 | (define %uenv.txt-debian 132 | (plain-file 133 | "uEnv.txt" 134 | "\ 135 | fdt_high=0xffffffffffffffff 136 | initrd_high=0xffffffffffffffff 137 | kernel_addr_r=0x84000000 138 | kernel_comp_addr_r=0x90000000 139 | kernel_comp_size=0x10000000 140 | fdt_addr_r=0x88000000 141 | ramdisk_addr_r=0x88300000 142 | # Move DHCP after MMC to speed up booting 143 | boot_targets=mmc0 dhcp 144 | # Fix wrong fdtfile name 145 | fdtfile=starfive/jh7100-starfive-visionfive-v1.dtb 146 | # Fix missing bootcmd 147 | bootcmd=run distro_bootcmd")) 148 | 149 | (define %uenv.txt-fedora 150 | (plain-file 151 | "uEnv.txt" 152 | "\ 153 | fdt_high=0xffffffffffffffff 154 | initrd_high=0xffffffffffffffff 155 | 156 | scriptaddr=0x88100000 157 | script_offset_f=0x1fff000 158 | script_size_f=0x1000 159 | 160 | kernel_addr_r=0x84000000 161 | kernel_comp_addr_r=0x90000000 162 | kernel_comp_size=0x10000000 163 | 164 | fdt_addr_r=0x88000000 165 | ramdisk_addr_r=0x88300000 166 | 167 | bootcmd=load mmc 0:2 0xa0000000 /EFI/fedora/grubriscv64.efi; bootefi 0xa0000000 168 | bootcmd_mmc0=devnum=0; run mmc_boot 169 | 170 | ipaddr=192.168.120.200 171 | netmask=255.255.255.0")) 172 | 173 | (define %uenv.txt-arch ; for visionfive2 174 | (plain-file 175 | "uEnv.txt" 176 | "\ 177 | fdt_high=0xffffffffffffffff 178 | initrd_high=0xffffffffffffffff 179 | kernel_addr_r=0x44000000 180 | kernel_comp_addr_r=0x90000000 181 | kernel_comp_size=0x10000000 182 | fdt_addr_r=0x48000000 183 | ramdisk_addr_r=0x48100000 184 | # Move distro to first boot to speed up booting 185 | boot_targets=distro mmc0 dhcp 186 | # Fix wrong fdtfile name 187 | fdtfile=starfive/jh7110-visionfive-v2.dtb 188 | # Fix missing bootcmd 189 | bootcmd=run bootcmd_distro")) 190 | 191 | ;; OS starts from here: 192 | 193 | (operating-system 194 | (host-name "visionfive1") 195 | (timezone "Asia/Jerusalem") 196 | (locale "en_IL.utf8") 197 | (locale-definitions 198 | (list (locale-definition (source "en_US") 199 | (name "en_US.UTF-8")) 200 | (locale-definition (source "he_IL") 201 | (name "he_IL.UTF-8")))) 202 | (keyboard-layout 203 | (keyboard-layout "us" "altgr-intl")) 204 | 205 | ;; No need for glibc-2.31. 206 | (locale-libcs (list (canonical-package glibc))) 207 | 208 | ;(bootloader (bootloader-configuration 209 | ; (bootloader grub-efi-bootloader) 210 | ; (targets '("/boot/efi")))) 211 | ;; not for u-boot, but for the config stuff 212 | (bootloader (bootloader-configuration 213 | (bootloader u-boot-starfive-visionfive-bootloader) 214 | (targets '("/dev/mmcblk0")))) ; SD card/eMMC (SD priority) storage 215 | ;; extlinux depends on syslinux 216 | ;(bootloader (bootloader-configuration 217 | ; (bootloader extlinux-bootloader) 218 | ; (targets '("/boot")))) 219 | 220 | (firmware '()) 221 | ;; Plenty of options for initrd modules. 222 | (initrd-modules '()) 223 | ;(initrd-modules '("dw_mmc-pltfm")) ;; suggested by Fedora? Not in 6.3-rc1+50patches kernel 224 | ;(initrd-modules (cons "nvme" %base-initrd-modules)) 225 | ;(initrd-modules '("nvme")) 226 | ;(initrd-modules '("mmc_spi")) 227 | ;; https://github.com/zhaofengli/nixos-riscv64/blob/master/nixos/unmatched.nix 228 | ;(initrd-modules '("nvme" "mmc_block" "mmc_spi" "spi_sifive" "spi_nor")) 229 | 230 | ;; Try the gernic kernel first. 231 | ;(kernel linux-libre-riscv64-generic) 232 | (kernel starfive-kernel) 233 | 234 | ;(swap-devices 235 | ; (list (swap-space 236 | ; (target "/swapfile")))) 237 | 238 | (file-systems 239 | (cons* (file-system 240 | (device (file-system-label "root")) 241 | (mount-point "/") 242 | (type "ext4")) 243 | ;; We're leaving it as an efi-raw image. 244 | ;(file-system 245 | ; (device "/dev/vda3") 246 | ; ;(device (uuid "9146-2C77" 'fat32)) 247 | ; (mount-point "/boot/efi") 248 | ; (type "vfat")) 249 | %guix-temproots 250 | %base-file-systems)) 251 | 252 | (users (cons* (user-account 253 | (name "riscv") 254 | (comment "Guix RISCV User") 255 | (group "users") 256 | (home-directory "/home/riscv") 257 | (password (crypt "starfive" "$6$abc123")) 258 | (supplementary-groups 259 | '("wheel" "netdev" "kvm" 260 | "audio" "video"))) 261 | %base-user-accounts)) 262 | 263 | (packages 264 | (append 265 | (map specification->package 266 | (list 267 | ;"screen" 268 | )) 269 | (delete (specification->package "guix-icons") %base-packages))) 270 | 271 | (services 272 | (cons* (service openssh-service-type 273 | (openssh-configuration 274 | (openssh (specification->package "openssh-sans-x")))) 275 | 276 | (service special-files-service-type 277 | `(("/boot/uEnv.txt" ,%uenv.txt))) 278 | 279 | ;(service mcron-service-type 280 | ; (mcron-configuration 281 | ; ;; Image created with ext4 282 | ; ;(jobs (%btrfs-maintenance-jobs "/")) 283 | ; (jobs 284 | ; (list 285 | ; #~(job '(next-hour '(3)) 286 | ; "guix gc --free-space=15G") 287 | ; ;; The board powers up at unix date 0. 288 | ; ;; Restart ntpd to set the clock. 289 | ; ;; This will run (24 hours and) 5 minutes after bootup. 290 | ; ;#~(job '(next-minute-from '(next-day) '(5)) 291 | ; ; "/run/current-system/profile/bin/herd restart ntpd") 292 | ; )))) 293 | 294 | (service openntpd-service-type 295 | (openntpd-configuration 296 | (listen-on '("127.0.0.1" "::1")) 297 | ;; Prevent moving to year 2116. 298 | (constraints-from '("https://www.google.com/")))) 299 | 300 | ;; connman + wpa or dhcp enough? 301 | ;(service connman-service-type) 302 | ;(service wpa-supplicant-service-type) 303 | (service dhcp-client-service-type) 304 | 305 | ;(service earlyoom-service-type 306 | ; (earlyoom-configuration 307 | ; (prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)") 308 | ; (avoid-regexp "guile"))) 309 | 310 | ;(service zram-device-service-type 311 | ; (zram-device-configuration 312 | ; (size (* 4 (expt 2 30))) 313 | ; (compression-algorithm 'zstd) 314 | ; (priority 100))) 315 | 316 | (modify-services 317 | %base-services 318 | (guix-service-type 319 | config => 320 | (guix-configuration 321 | (inherit config) 322 | (substitute-urls '()) ; No riscv64 substitutes. 323 | (authorized-keys %authorized-keys) 324 | (extra-options 325 | (cons* "--cache-failures" %extra-options))))))) 326 | 327 | ;; Allow resolution of '.local' host names with mDNS. 328 | (name-service-switch %mdns-host-lookup-nss)) 329 | 330 | ;; guix system image --image-type=raw-with-offset -L ~/workspace/guix-config/ ~/workspace/guix-config/visionfive1.scm --system=riscv64-linux 331 | -------------------------------------------------------------------------------- /visionfive2.scm: -------------------------------------------------------------------------------- 1 | (define-module (visionfive2)) 2 | (use-modules (guix packages) 3 | (gnu) 4 | (gnu bootloader u-boot) 5 | (gnu system locale) 6 | (gnu system images visionfive2) 7 | (config filesystems) 8 | (config guix-daemon) 9 | (dfsg contrib services tailscale) 10 | (srfi srfi-1)) 11 | (use-service-modules 12 | linux 13 | mcron 14 | networking 15 | ssh) 16 | (use-package-modules 17 | linux) 18 | (export %visionfive2-system) 19 | 20 | (define %visionfive2-system 21 | (operating-system 22 | (inherit visionfive2-barebones-os) 23 | (host-name "visionfive2") 24 | (timezone "Asia/Jerusalem") 25 | (locale "en_IL.utf8") 26 | (locale-definitions 27 | (list (locale-definition (source "en_US") 28 | (name "en_US.UTF-8")) 29 | (locale-definition (source "he_IL") 30 | (name "he_IL.UTF-8")))) 31 | (keyboard-layout 32 | (keyboard-layout "us" "altgr-intl")) 33 | 34 | (bootloader 35 | (bootloader-configuration 36 | (bootloader u-boot-starfive-visionfive2-bootloader) 37 | (targets '("/dev/mmcblk0")))) ; SD card/eMMC (SD priority) storage 38 | 39 | ;(initrd-modules '()) 40 | ;(kernel linux-libre-riscv64-generic) 41 | (firmware '()) 42 | ;; Taken from Z572's jh7110 system config. 43 | (initrd-modules (cons* "mmc_block" 44 | "clk-starfive-jh7110-aon" 45 | "clk-starfive-jh7110-stg" 46 | "phy-jh7110-dphy-tx" 47 | "pcie_starfive" 48 | "nvme" 49 | %base-initrd-modules)) 50 | 51 | (file-systems 52 | (cons* (file-system 53 | (device (file-system-label "Guix_image")) 54 | (mount-point "/") 55 | (type "ext4")) 56 | %guix-temproots 57 | %base-file-systems)) 58 | 59 | (users (cons (user-account 60 | (name "efraim") 61 | (comment "Efraim") 62 | (group "users") 63 | (home-directory "/home/efraim") 64 | (password "$6$4t79wXvnVk$bjwOl0YCkILfyWbr1BBxiPxJ0GJhdFrPdbBjndFjZpqHwd9poOpq2x5WtdWPWElK8tQ8rHJLg3mJ4ZfjrQekL1") 65 | (supplementary-groups '("wheel" 66 | "netdev" "kvm"))) 67 | %base-user-accounts)) 68 | 69 | (sudoers-file 70 | (plain-file "sudoers" 71 | (string-append (plain-file-content %sudoers-specification) 72 | (format #f "efraim ALL = NOPASSWD: ALL~%")))) 73 | 74 | ;; This is where we specify system-wide packages. 75 | (packages 76 | (append 77 | (map specification->package 78 | (list "screen")) 79 | (delete (specification->package "guix-icons") %base-packages))) 80 | 81 | (services 82 | (cons* (service agetty-service-type 83 | (agetty-configuration 84 | (extra-options '("-L")) 85 | (baud-rate "115200") 86 | (term "vt100") 87 | (tty "ttyS0"))) 88 | 89 | (service openssh-service-type 90 | (openssh-configuration 91 | (openssh (specification->package "openssh-sans-x")) 92 | (authorized-keys 93 | `(("efraim" ,(local-file "Extras/efraim.pub")))))) 94 | 95 | (service tailscaled-service-type 96 | (tailscaled-configuration 97 | (package (specification->package "tailscale")))) 98 | 99 | (service mcron-service-type 100 | (mcron-configuration 101 | (jobs 102 | (list 103 | #~(job '(next-hour '(3)) 104 | "guix gc --free-space=15G"))))) 105 | 106 | (service ntp-service-type) 107 | 108 | (service dhcp-client-service-type) 109 | 110 | (service earlyoom-service-type 111 | (earlyoom-configuration 112 | (prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)") 113 | (avoid-regexp "guile"))) 114 | 115 | (service zram-device-service-type 116 | (zram-device-configuration 117 | (size (* 4 (expt 2 30))) 118 | (compression-algorithm 'zstd) 119 | (priority 100))) 120 | 121 | (modify-services 122 | %base-services 123 | (guix-service-type 124 | config => 125 | (guix-configuration 126 | (inherit config) 127 | (substitute-urls '()) ; Offload machine 128 | (authorized-keys %authorized-keys) 129 | (extra-options 130 | (cons* "--cache-failures" 131 | %extra-options))))))) 132 | 133 | ;; Allow resolution of '.local' host names with mDNS. 134 | (name-service-switch %mdns-host-lookup-nss))) 135 | 136 | %visionfive2-system 137 | 138 | ;; guix system image --image-type=visionfive2-raw -L ~/workspace/my-guix -L ~/workspace/guix-config ~/workspace/guix-config/visionfive2.scm --system=riscv64-linux 139 | ;; guix system image --image-type=visionfive2-raw -L ~/workspace/my-guix -L ~/workspace/guix-config ~/workspace/guix-config/visionfive2.scm --target=riscv64-linux-gnu 140 | 141 | ;; sudo cfdisk /dev/sdX to resize /dev/sdX3 to use the remaining space left at the end of the µSD card 142 | ;; guix shell e2fsprogs -- sudo resize2fs /dev/sdX3 143 | ;; guix shell e2fsck-static -- sudo -E e2fsck /dev/sdX3 144 | -------------------------------------------------------------------------------- /vm_config.scm: -------------------------------------------------------------------------------- 1 | (define-module (vm_config)) 2 | (use-modules (guix store) 3 | (gnu) 4 | (srfi srfi-1)) 5 | (use-service-modules 6 | admin 7 | linux 8 | networking 9 | ssh) 10 | 11 | ;; One file, no guix-config checkout. 12 | (define %efraim-ssh-key 13 | (plain-file "id_ed25519.pub" 14 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF3PkIpyUbnAtS8B5oO1rDm2vW5xhArIVjaRJrZzHVkX efraim@flashner.co.il")) 15 | 16 | (operating-system 17 | (host-name "guix_vm") 18 | (timezone "Etc/UTC") 19 | (locale "en_US.UTF-8") 20 | 21 | ;; Choose either grub or grub-efi. 22 | ;; Check 'lsblk' if grub for '/dev/vda' replacement. 23 | (bootloader (bootloader-configuration 24 | (bootloader grub-bootloader) 25 | (targets '("/dev/vda")) 26 | ;(bootloader grub-efi-bootloader) 27 | ;(target "/boot/efi") 28 | (terminal-outputs '(console)))) 29 | 30 | (firmware '()) 31 | 32 | (file-systems 33 | (cons* (file-system 34 | (mount-point "/") 35 | ;; lsblk --output MOUNTPOINT,UUID 36 | (device (uuid "0000-0000" 'fat)) 37 | (type "ext4")) 38 | ;; This is only necessary if you're using EFI. 39 | ;(file-system 40 | ; (device (uuid "0000-0000" 'fat)) 41 | ; (mount-point "/boot/efi") 42 | ; (type "vfat")) 43 | (file-system 44 | (device "tmpfs") 45 | (mount-point "/var/guix/temproots") 46 | (type "tmpfs") 47 | (flags '(no-suid no-dev no-exec)) 48 | (check? #f)) 49 | %base-file-systems)) 50 | 51 | ;; Be sure you create the swpfile first! 52 | ;(swap-devices 53 | ; (list (swap-space 54 | ; (target "/swapfile")))) 55 | 56 | (users (cons (user-account 57 | (name "efraim") 58 | (comment "Efraim") 59 | (group "users") 60 | (supplementary-groups '("wheel" "netdev" "kvm")) 61 | (password "$6$4t79wXvnVk$bjwOl0YCkILfyWbr1BBxiPxJ0GJhdFrPdbBjndFjZpqHwd9poOpq2x5WtdWPWElK8tQ8rHJLg3mJ4ZfjrQekL1") 62 | (home-directory "/home/efraim")) 63 | %base-user-accounts)) 64 | 65 | ;; This is where we specify system-wide packages. 66 | (packages (cons* %base-packages)) 67 | 68 | (services 69 | (cons* (service openssh-service-type 70 | (openssh-configuration 71 | (openssh (specification->package "openssh-sans-x")) 72 | (authorized-keys 73 | `(("efraim" ,%efraim-ssh-key))) 74 | (extra-content "StreamLocalBindUnlink yes"))) 75 | 76 | #;(service tor-service-type 77 | (tor-configuration 78 | (hidden-services 79 | (list 80 | (tor-onion-service-configuration 81 | (name "ssh") 82 | (mapping '((22 "127.0.0.1:22")))))))) 83 | 84 | (service openntpd-service-type 85 | (openntpd-configuration 86 | (listen-on '("127.0.0.1" "::1")) 87 | (constraints-from '("https://www.google.com/")))) 88 | 89 | (service zram-device-service-type 90 | (zram-device-configuration 91 | (size (* 1 (expt 2 30))) 92 | (compression-algorithm 'zstd) 93 | (priority 100))) 94 | 95 | ;; For networking 96 | (service dhcp-client-service-type) 97 | 98 | (modify-services 99 | %base-services 100 | ;; The default udev rules are not needed in a VM. 101 | ;; TODO: Remove udev entirely? 102 | (udev-service-type config => 103 | (udev-configuration 104 | (inherit config) 105 | (rules '()))) 106 | #;(guix-service-type config => 107 | (guix-configuration 108 | (inherit config)))))) 109 | 110 | ;; Allow resolution of '.local' host names with mDNS. 111 | (name-service-switch %mdns-host-lookup-nss)) 112 | --------------------------------------------------------------------------------