From: Amin Bandali Date: Sat, 28 Mar 2020 06:10:45 +0000 (-0400) Subject: remove some vestigial files X-Git-Url: https://git.shemshak.org/~bandali/bndl.org/commitdiff_plain/746aa75ea7cb5f19895a316414b21006727865e7?hp=7a66e6ec5d73f54ccf06f70be1bb9ba594bfae12 remove some vestigial files --- diff --git a/bandali/feeds.scm b/bandali/feeds.scm deleted file mode 100644 index 07678fc..0000000 --- a/bandali/feeds.scm +++ /dev/null @@ -1,71 +0,0 @@ -;;; Copyright © 2019 Amin Bandali -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 3 of the -;;; License, or (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this program. If not, see -;;; . - -(define-module (bandali feeds) - #:use-module (haunt builder atom) ; atom-feed - #:use-module (haunt builder rss) ; rss-feed - #:use-module (haunt post) ; post-* - #:use-module (ice-9 match) ; match-lambda - #:re-export (atom-feed - rss-feed) - #:export (atom-feeds-by-tag - rss-feeds-by-tag)) - -(define* (atom-feeds-by-tag #:key - (prefix "feeds/tags") - (filter posts/reverse-chronological) - (max-entries 20) - (blog-prefix "")) - "Return a builder procedure that renders an atom feed for every tag -used in a post. All arguments are optional: - -PREFIX: The directory in which to write the feeds -FILTER: The procedure called to manipulate the posts list before rendering -MAX-ENTRIES: The maximum number of posts to render in each feed" - (lambda (site posts) - (let ((tag-groups (posts/group-by-tag posts))) - (map (match-lambda - ((tag . posts) - ((atom-feed #:file-name (string-append prefix "/" tag ".atom") - #:subtitle (string-append "Tag: " tag) - #:filter filter - #:max-entries max-entries - #:blog-prefix blog-prefix) - site posts))) - tag-groups)))) - -(define* (rss-feeds-by-tag #:key - (prefix "feeds/tags") - (filter posts/reverse-chronological) - (max-entries 20) - (blog-prefix "")) - "Return a builder procedure that renders an rss feed for every tag -used in a post. All arguments are optional: - -PREFIX: The directory in which to write the feeds -FILTER: The procedure called to manipulate the posts list before rendering -MAX-ENTRIES: The maximum number of posts to render in each feed" - (lambda (site posts) - (let ((tag-groups (posts/group-by-tag posts))) - (map (match-lambda - ((tag . posts) - ((rss-feed #:file-name (string-append prefix "/" tag ".rss") - #:subtitle (string-append "Tag: " tag) - #:filter filter - #:max-entries max-entries - #:blog-prefix blog-prefix) - site posts))) - tag-groups)))) diff --git a/bandali/pages.scm b/bandali/pages.scm deleted file mode 100644 index b553193..0000000 --- a/bandali/pages.scm +++ /dev/null @@ -1,352 +0,0 @@ -;;; Copyright © 2019-2020 Amin Bandali -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 3 of the -;;; License, or (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this program. If not, see -;;; . - -(define-module (bandali pages) - #:use-module (bandali prefs) ; my-* - #:use-module (bandali theme) ; base-layout - #:use-module (bandali utils) ; aa - #:use-module (haunt html) ; sxml->html - #:use-module (haunt page) ; make-page - #:use-module (ice-9 match) ; match-lambda - #:export (static-page - index-page - license-page - contact-page - cv-page - se212-f19-page)) - -(define* (static-page title file-name body copy #:key license?) - (lambda (site posts) - (make-page file-name - (base-layout site body #:title title #:copy copy - #:license-page? license?) - sxml->html))) - -(define (index-material site posts) - `((h1 (@ (style "font-size: 0;")) - "Amin Bandali") - (p (@ (style "margin-top: 0;")) - "Hi, I’m " - ,(aa "Amin Bandali" "images/bandali-with-rms.jpg" - "photo of bandali with rms wearing a " - "“pay cash don’t be tracked” pin") - ". I’m a graduate student at " - ,(aa "WatForm" "https://watform.uwaterloo.ca") - " at University of Waterloo, supervised by " - ,(aa "Dr. Nancy Day" "https://cs.uwaterloo.ca/~nday/") - ". The main goal of my research is improving " - (strong "software and systems reliability") - " through application of " (em "formal methods") ".") - (p "My research at WatForm focuses on formal logic, model " - "checking, and verification. I’m also interested in " - "programming languages, theorem provers, and their " - "type systems. You may wish to view my academic " - ,(aa "curriculum vitae" "bandali-cv.html") ".") - (p "On the side, I dabble in " - ,(aa "Lean" "https://leanprover.github.io") " and enjoy " - ,(aa "hacking" "https://stallman.org/articles/on-hacking.html") - " on " - ,(aa "Elisp" - "https://www.gnu.org/software/emacs/manual/elisp.html") - ". I’m a " ,(aa "Free Software" - "https://www.gnu.org/philosophy/free-sw.html") - " activist, a GNU " - ,(aa "maintainer" "https://www.gnu.org/people/#bandali") - " and " - ,(aa "webmaster" - "https://www.gnu.org/people/webmeisters.html#bandali") - ", and an " ,(aa "associate member" - "https://www.fsf.org/associate/") - " of the " ,(aa "FSF" "https:///www.fsf.org" - "Free Software Foundation") - ". I co-host the " ,(aa "Emacs.el" "https://emacsel.com") - " podcast with " ,(aa "Daniel Gopar" "https://www.pygopar.com") - ", and organize " ,(aa "EmacsConf" "https://emacsconf.org") - " with help from many wonderful people. I am also a member of" - " the Systems Committee for the " - ,(aa "CSC" "https://csclub.uwaterloo.ca" - "Computer Science Club of the University of Waterloo") - ".") - (p "See my " ,(aa "contact" "contact.html") " page for how to " - "best reach me.") - (h2 (@ (id "papers")) "Papers") - (dl - (dt "A Comparison of the Declarative Modelling Languages B, DASH, - and TLA" (sup "+") - (small - " [ " ,(aa "pdf" "papers/modre2018-declarative.pdf") " | " - ,(aa "bib" "papers/modre2018-declarative.bib") " ]")) - (dd "Ali Abbassi, " - ,(aa "Amin Bandali" my-url) ", " - ,(aa "Nancy A. Day" "https://cs.uwaterloo.ca/~nday/") ", " - "Jose Serna" - (br) - (em "2018 IEEE 8th International Model-Driven Requirements" - " Engineering Workshop (MoDRE)") - (br) - "Copyright © 2018 IEEE. All Rights Reserved. Sadly.")) - (h2 (@ (id "talks")) "Talks") - (dl - (dt - "The Magic of Specifications and Type Systems" - (small - " [ " - ,(aa "slides" "talks/cucsc-2017-slides.pdf" - "presented at the Canadian Undergraduate Computer Science" - " Conference 2017,\n" - "University of Toronto, Canada, June 15–17, 2017") - " | " - ,(aa "poster" "talks/eecs4080-poster.pdf" - "presented at the Lassonde Undergraduate Summer Student" - " Research Conference,\n" - "York University, Toronto, Canada, August 15, 2017") - " ]")) - (dd ,(aa "Amin Bandali" my-url) ", " - ,(aa "Simon Hudon" "https://github.com/cipher1024") ", " - ,(aa "Jonathan S. Ostroff" - "http://www.cse.yorku.ca/~jonathan/"))) - (h2 (@ (id "projects")) "Projects") - (p "Below are a number of free software projects I have worked " - "on:") - (dl - (dt ,(aa "george-mode" "https://git.sr.ht/~bandali/george-mode")) - (dd "Emacs major mode for editing George files") - (dt ,(aa "alloy-catalyst" - "https://git.uwaterloo.ca/bandali/alloy-catalyst")) - (dd "Framework for performance analysis of Alloy models") - (dt ,(aa "unitb-web" "https://github.com/unitb/unitb-web")) - (dd "Web interface for Unit-B") - (dt ,(aa "tex2png-hs" "https://github.com/unitb/tex2png-hs")) - (dd "Library and CLI for converting TeX and LaTeX to PNG " - "images")) - (h2 (@ (id "notes")) "Notes") - (p "Here are notes about a variety of topics and issues I care " - "about. They’re also available via " - ,(aa `((img (@ (class "feed-icon") - (src "/icon-12px.png") - (alt "subscribe to atom feed"))) - "Atom") - "notes.atom") - " and " - ,(aa `((img (@ (class "feed-icon") - (src "/icon-12px.png") - (alt "subscribe to rss feed"))) - "RSS") "notes.rss") " feeds.") - ,(post-list-table site posts))) - -(define (index-page site posts) - (make-page - "index.html" - (base-layout site (index-material site posts)) - sxml->html)) - -(define license-page - (static-page - "Licensing Information" - "license.html" - `((h1 "License information for " - ,(aa my-domain my-url)) - (p "I strongly believe in " - ,(aa "free culture" - "https://questioncopyright.org/what_is_free_culture") - " and that all creative works everywhere should be " - ,(aa "free" "https://freedomdefined.org/Definition") ".") - (p "Unless otherwise noted material on this site is licensed " - "under the GNU General Public License as published by the " - "Free Software Foundation, either version 3 of the License, " - "or (at your option) any later version. A copy of the " - "license is included at " ,(aa "gpl-3.0.html") ".") - (p "Some resources on free software and licenses:") - (ul - (li ,(aa "What is free software?" - "https://www.gnu.org/philosophy/free-sw.html")) - (li ,(aa "Various Licenses and Comments about Them" - "https://www.gnu.org/licenses/license-list.html")) - (li ,(aa "Proprietary Software Is Often Malware" - "https://www.gnu.org/proprietary/proprietary.html")))) - "2019" - #:license? #t)) - -(define contact-page - (static-page - "Contact Information" - "contact.html" - `((h1 "Contact information") - (p "Email is by far my preferred method of communication. I may" - " be contacted at any of the following addresses (choose the" - " one most closely related):") - (ul - (li "bandali@gnu.org") - (li "bandali@uwaterloo.ca") - (li "bandali@csclub.uwaterloo.ca")) - (p "If you want to send me GPG-encrypted mail, you can use my " - ,(aa "public key" "bandali-pubkey.txt") " with the" - " fingerprint " - (code "BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103") - ".") - (table - (tbody - (tr - (td "IRC") - (td "bandali on " ,(aa "freenode" "https://freenode.net") ", " - ,(aa "moznet" "https://wiki.mozilla.org/IRC") ", and " - ,(aa "oftc" "https://www.oftc.net"))) - (tr - (td "XMPP") - (td ,(aa "bandali@member.fsf.org" - "xmpp:bandali@member.fsf.org"))) - (tr - (td "Matrix") - (td ,(aa "@bandali:matrix.org" - "https://matrix.to/#/@bandali:matrix.org"))) - (tr - (td "Fediverse") - (td ,(aa "@bandali@pleroma.site" - "https://pleroma.site/bandali"))))) - (h2 "Elsewhere") - (p "You may also find me at a few other places online. Stricken" - " through accounts are those I don’t use anymore, unless" - " absolutely necessary.") - (ul - (li ,(aa "bandali" "https://savannah.gnu.org/users/bandali") - " on GNU Savannah") - (li ,(aa "bandali" "https://libreplanet.org/wiki/User:Bandali") - " on LibrePlanet") - (li ,(aa "bandali" "https://emacsconf.org/bandali") - " on EmacsConf") - (li ,(aa "bandali" "https://git.sr.ht/~bandali") - " on Sourcehut") - (li ,(aa "bandali" "https://lobste.rs/u/bandali") - " on Lobsters") - (li ,(aa "bandali" "https://hackage.haskell.org/user/bandali") - " on Hackage") - (li ,(aa "bandali" "https://gitlab.com/bandali") - " on GitLab") - (li ,(aa "bandali" - "https://news.ycombinator.com/user?id=bandali") - " on HN") - (li ,(aa "bandali" "https://www.reddit.com/u/bandali") - " on reddit") - (li (del ,(aa "notbandali" "https://github.com/notbandali") - " on GitHub")) - (li (del ,(aa "notbandali" "https://twitter.com/notbandali") - " on Twitter")))) - "2020")) - -(define cv-page - (static-page - "Curriculum vitae" - "bandali-cv.html" - `((h1 "Curriculum vitae (" ,(aa "PDF" "bandali-cv.pdf") ")") - (table - (tbody - (tr - (td "Site") - (td ,(aa my-domain my-url))) - (tr - (td "Email") - (td "bandali@uwaterloo.ca")) - (tr - (td "Phone") - (td "available upon request via email")))) - (h2 "Education") - (h3 "Master of Mathematics (Computer Science) | 2018–present") - (p "University of Waterloo, Canada") - (p "Supervised by Dr. Nancy Day | GPA: 3.7/4.0 | " - "Expected completion: April 2020") - (p "Research focusing on formal logic, model checking, and " - "verification.") - (h3 "B.Sc. Honours Computer Science | 2013–2017") - (p "York University, Toronto, Canada") - (p "GPA: 7.84/9.0") - (p "Relevant courses: System Specification & Refinement, " - "Software Requirements Eng., Software Design, " - "Operating Systems, Computational Complexity, " - "Design & Analysis of Algorithms.") - (p "Finished first year (2013-14) at " (em "Carleton University") - " with a GPA of 11.0/12.0, then transferred to " - (em "York University") " in Fall 2014.") - (h2 "Publications") - (p "Listed on my " ,(aa "homepage" "/#papers")) - (h2 "Work & Research Experience") - (h3 "Cheriton School of Computer Science, University of Waterloo" - " | 2018–present") - (p "Instructional Apprentice, Teaching Assistant, " - "Research Assistant") - (ul - (li (abbr (@ (title "Logic and Computation")) "SE 212") ": " - ,(aa `((abbr (@ (title "Instructional Apprentice")) "IA") - " in Fall 2019") "se212-f19/") - ", " - (abbr (@ (title "Teaching Assistant")) "TA") " in " - "Fall 2018") - (li (abbr (@ (title ,(string-append - "Software Requirements Specification and " - "Analysis"))) "SE 463") - ": TA in Summer 2019 and 2018") - (li (abbr (@ (title ,(string-append - "Elementary Algorithm Design and " - "Data Abstraction"))) "CS 136") - ": TA in Winter 2018")) - (h3 (abbr (@ (title - ,(string-append - "Electrical Engineering & Computer Science"))) - "EECS") - " Department, York University | Fall 2017") - (p "Teaching Assistant") - (p (abbr (@ (title "Net-Centric Introduction to Computing")) - "EECS 1012") - ": TA in Fall 2017")) - "2019")) - -(define se212-f19-page - (static-page - "SE 212 Material" - "se212-f19/index.html" - `((h1 "Material from SE 212 tutorials") - (p "This page contains slides and other material from " - ,(aa "SE 212 tutorials" - "https://www.student.cs.uwaterloo.ca/~se212/times.html") - " held by me in Fall 2019. " - (del "If you have any questions, concerns, or suggestions " - "about the presented material, please email me at " - "bandali@uwaterloo.ca or come see me during my " - ,(aa "Friday office hours" - "https://www.student.cs.uwaterloo.ca/~se212/personnel.html") - ".")) - (ul - (li "Tutorial 1:" - (ul - (li ,(aa "TUT 101 slides" "se212-t01-101.pdf")) - (li ,(aa "TUT 102 slides" "se212-t01-102.pdf")) - (li ,(aa "Org beamer sources" "se212-t01.org")))) - (li "Tutorial 2:" - (ul - (li ,(aa "Homework 2 q04d solution" - "se212-h02q04d-soln.grg")))) - (li "Tutorial 3: —") - (li "Tutorial 4: —") - (li "Tutorial 5:" - (ul - (li ,(aa "Slides" "se212-t05.pdf")) - (li ,(aa "Org beamer sources" "se212-t05.org")))) - (li "Tutorial 6: —") - (li "Tutorial 7: worked through questions 1–5 of Homework 7") - (li "Tutorial 8: —") - (li "Tutorial 9: —") - (li "Tutorial 10: worked through questions 1–10 of " - "Homework 10"))) - "2019")) diff --git a/bandali/prefs.scm b/bandali/prefs.scm deleted file mode 100644 index 1896ea1..0000000 --- a/bandali/prefs.scm +++ /dev/null @@ -1,31 +0,0 @@ -;;; Copyright © 2019-2020 Amin Bandali -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 3 of the -;;; License, or (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this program. If not, see -;;; . - -(define-module (bandali prefs) - #:export (my-scheme - my-domain - my-url - my-tag-prefix - my-primary-date-format - my-secondary-date-format)) - -(define my-scheme 'https) -(define my-domain "bandali.eu.org") -(define my-url - (string-append (symbol->string my-scheme) "://" my-domain)) -(define my-tag-prefix "tags") -(define my-primary-date-format "~1") -(define my-secondary-date-format "~A ~B ~e, ~Y") diff --git a/bandali/tags.scm b/bandali/tags.scm deleted file mode 100644 index 41fcb82..0000000 --- a/bandali/tags.scm +++ /dev/null @@ -1,75 +0,0 @@ -;;; Copyright © 2019 Amin Bandali -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 3 of the -;;; License, or (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this program. If not, see -;;; . - -(define-module (bandali tags) - #:use-module (bandali prefs) ; my-* - #:use-module (bandali theme) ; bandali-theme - #:use-module (bandali utils) ; aa - #:use-module (haunt builder blog) ; theme-collection-template - #:use-module (haunt html) ; sxml->html - #:use-module (haunt page) ; make-page - #:use-module (haunt post) - #:use-module (ice-9 match) ; match-lambda - #:export (tag-uri - tag-pages - tag-links)) - -(define* (tag-uri prefix tag #:optional (ext ".html")) - "Return a URI relative to the site's root for a page listing entries -in PREFIX that are tagged with TAG." - (string-append "/" prefix "/" tag ext)) - -(define* (tag-pages #:key - (theme bandali-theme) - (prefix "") - (filter posts/reverse-chronological)) - "Return a builder procedure that renders a list page for every tag -used in a post. All arguments are optional: - -PREFIX: The directory in which to write the posts -FILTER: The procedure called to manipulate the posts list before rendering" - (lambda (site posts) - (define (tag-list tag posts all-posts) - (define (render-list title posts prefix) - (let ((body ((theme-collection-template theme) - site title posts prefix all-posts tag))) - ((theme-layout theme) site title body))) - (make-page (tag-uri my-tag-prefix tag) - (render-list (string-append "Notes tagged ‘" tag "’") - (filter posts) - prefix) - sxml->html)) - (let ((tag-groups (posts/group-by-tag posts))) - (map (match-lambda - ((tag . tagged-posts) (tag-list tag tagged-posts posts))) - tag-groups)))) - -(define (tag-links posts) - "Generate an alphabetically sorted list of links to tagged posts. -The link text consists of the tag name and the number of tagged posts -in parentheses." - `(ul (@ (class "tag-list")) - ,(map (match-lambda - ((tag . posts) - `(li - ,(aa (string-append tag - " (" - (number->string (length posts)) - ")") - (tag-uri my-tag-prefix tag))))) - ;; sort by tag - (sort (posts/group-by-tag posts) - (lambda (a b) (string -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 3 of the -;;; License, or (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this program. If not, see -;;; . - -(define-module (bandali theme) - #:use-module (bandali prefs) ; my-* - #:use-module (bandali tags) ; tag-* - #:use-module (bandali utils) - #:use-module (haunt builder blog) ; theme - #:use-module (haunt post) ; post-* - #:use-module (haunt site) ; site-* - #:use-module (haunt utils) ; string->date* - #:use-module (srfi srfi-19) - #:export (base-layout - post-uri - post-list-table - bandali-theme)) - -(define* (base-layout site body #:key title copy license-page?) - `((doctype "html") - (html - (head - (meta (@ (charset "utf-8"))) - (meta (@ (name "viewport") - (content "width=device-width, initial-scale=1"))) - (title ,(if title (string-append title " — " (site-title site)) - "Amin Bandali’s Personal Site")) - (link (@ (rel "icon") - (href "/gnu.ico"))) - ,(stylesheet "reset") - ,(stylesheet "style")) - (body - (main ,body) - (footer - (p "Copyright © " - ,(if copy copy "2016–2019") - " Amin Bandali. See " - ,(if license-page? "the above" - (aa "license.html" "/license.html")) - " for license conditions. Please copy and share.")))))) - -(define* (post-uri site post #:optional prefix) - (string-append (or prefix "") "/" - (site-post-slug site post) ".html")) - -(define* (post-list-table site posts #:optional prefix) - `((table - (@ (class "post-list")) - (tbody - ,@(map - (lambda (post) - `(tr - (td ,(aa (post-ref post 'title) - (post-uri site post prefix))) - (td (small (@ (title - ,(date->string (post-date post) - my-secondary-date-format))) - ,(date->string (post-date post) - my-primary-date-format))))) - posts))))) - -(define (my-post-template post) - `((header - (h1 ,(post-ref post 'title)) - (address "By " ,(aa (post-ref post 'author) "/") - " <" ,(post-ref post 'email) ">") - (p (@ (class "date")) - (span (@ (title ,(date->string (post-date post) - my-secondary-date-format))) - ,(date->string (post-date post) - my-primary-date-format)) - ,(if (post-ref post 'updated) - `(" (updated on " - (span (@ (title - ,(date->string (post-ref post 'updated) - my-secondary-date-format))) - ,(date->string (post-ref post 'updated) - my-primary-date-format)) - ")") '())) - ,(if (post-ref post 'tags) - `(p (@ (class "tags")) - ,@(intersperse - (map (lambda (tag) - (aa tag (tag-uri my-tag-prefix tag) - "Notes tagged ‘" tag "’")) - (post-ref post 'tags)) - ", ")) - '())) - ,(post-sxml post) - (p (@ (class "muted inbox")) - "Got a question or comment? Write to me at my email address " - "at the top of this page!"))) - -(define* (my-collection-template site title posts prefix - #:optional all-posts tag) - `((h2 ,title - ,(if tag - (aa `(img (@ (class "feed-icon-h2") - (src "/icon-16px.png") - (alt "subscribe to atom feed"))) - (tag-uri my-tag-prefix tag ".xml")) - '())) - ,(post-list-table site posts prefix) - (h2 (@ (id "tags")) "Tags") - ,(tag-links (or all-posts posts)) - ,(if tag - '(a (@ (href "/notes.html")) - "← all notes") - '()))) - -(define bandali-theme - (theme #:name "bandali" - #:layout - (lambda (site title body) - (base-layout site body - #:title title)) - #:post-template my-post-template - #:collection-template my-collection-template)) - -(module-define! - (resolve-module '(haunt builder blog)) - 'render-post - (lambda (theme site post) - (let ((title (post-ref post 'title)) - (body ((theme-post-template theme) post)) - (copy (post-ref post 'copyright))) - (base-layout site body #:title title #:copy copy)))) - -(register-metadata-parser! 'updated string->date*) diff --git a/bandali/utils.scm b/bandali/utils.scm deleted file mode 100644 index 0c32df3..0000000 --- a/bandali/utils.scm +++ /dev/null @@ -1,36 +0,0 @@ -;;; Copyright © 2019 Amin Bandali -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 3 of the -;;; License, or (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this program. If not, see -;;; . - -(define-module (bandali utils) - #:export (aa - stylesheet - intersperse)) - -(define* (aa content #:optional (uri content) . title) - `(a (@ (href ,uri) (title ,(apply string-append title))) ,content)) - -(define (stylesheet name) - `(link (@ (rel "stylesheet") - (href ,(string-append "/" name ".css"))))) - -(define (intersperse lst delim) - "Return the elements of LST delimited by DELIM, such that the -resulting list is of an odd length and every second element is DELIM." - (if (<= (length lst) 1) - lst - (cons* (car lst) - delim - (intersperse (cdr lst) delim)))) diff --git a/content-org/aminb.org b/content-org/aminb.org deleted file mode 100644 index 8be4b72..0000000 --- a/content-org/aminb.org +++ /dev/null @@ -1,533 +0,0 @@ -#+title: sources of aminb.org's pages and posts - -#+hugo_base_dir: .. -#+seq_todo: TODO DRAFT DONE -#+property: header-args :eval never-export -#+options: author:nil - -#+macro: abbr @@html:$1@@ -#+macro: span @@html:$2@@ - -* Pages -:PROPERTIES: -:EXPORT_HUGO_SECTION: / -:END: - -** Home -:PROPERTIES: -:EXPORT_FILE_NAME: _index -:END: - -I'm Amin Bandali (often =bandali= or =aminb= on [[/contact][the interwebs]]). I’m -currently a [[/uw][graduate student]] in the [[https://watform.uwaterloo.ca][WatForm]] group at University of -Waterloo, supervised by [[https://cs.uwaterloo.ca/~nday/][Nancy Day]]. My current research focuses on -formal logic, model checking, and verification. On the side, I also -dabble in [[https://leanprover.github.io][Lean]] and [[https://www.rust-lang.org][Rust]], and I enjoy [[https://stallman.org/articles/on-hacking.html][hacking]] on [[https://www.gnu.org/software/emacs/manual/elisp.html][Elisp]]. - -** CV -:PROPERTIES: -:EXPORT_FILE_NAME: cv -:EXPORT_HUGO_MENU: :menu topnav :weight 10 -:END: - -My academic {{{abbr(CV)}}} is available as [[/cv.pdf][cv.pdf]], -and an outdated professional resume is available as [[/resume.pdf][resume.pdf]] as -well. - -I'm interested in functional programming and functional languages, -type systems, and formal methods in general. I love writing Haskell -and I'm looking into Rust and Lean as well. Feel free to [[/contact][drop me a -line]] if you like to geek out about any of the above. - -** DONE Now -CLOSED: [2018-09-04 Tue 10:53] -:PROPERTIES: -:EXPORT_FILE_NAME: now -:EXPORT_HUGO_AUTO_SET_LASTMOD: t -:EXPORT_HUGO_MENU: :menu topnav :weight 20 -:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :customTitle "What I'm doing now" -:END: - -This is my [[https://nownownow.com/about][now page]]. - -I'm currently a [[/uw][graduate student]] in the Waterloo Formal Methods group -at University of Waterloo. I just finished my degree’s coursework -requirements in Fall 2018, and will be focusing on my thesis starting -this term, Winter 2019. - -In my spare time, I write [[https://www.gnu.org/philosophy/free-sw.en.html][free software]] (see my [[/projects][projects]] page), and -tend to various tasks as a GNU webmaster. I've also been picking up -the guitar, after giving up on my longtime dream of being a pianist -(at least for now). - -This update was on {{< lastmod >}}. - -** DONE Projects -CLOSED: [2019-01-06 Sun 22:37] -:PROPERTIES: -:EXPORT_FILE_NAME: projects -:EXPORT_HUGO_MENU: :menu topnav :weight 30 -:END: - -TODO: set up projects page with my projects. - -In the mean time, have a look at [[https://git.aminb.org][git.aminb.org]] instead. - -** DONE Contact -CLOSED: [2018-09-03 Mon 20:44] -:PROPERTIES: -:EXPORT_FILE_NAME: contact -:EXPORT_HUGO_MENU: :menu topnav :weight 40 -:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :customTitle "Say hello!" -:END: - -#+macro: xmpp @@html:$1@@ - -You can contact me via email or through my accounts on various online -platforms. - -*** Primary - -Email is my preferred method of communication. - -- [[mailto:amin@bndl.org][amin@bndl.org]], personal or general inquiries -- [[mailto:bandali@gnu.org][bandali@gnu.org]], GNU- or free software-related ([[/gpg][gpg key]]) -- [[mailto:abandali@uwaterloo.ca][abandali@uwaterloo.ca]], academic or UW-related - -*** Secondary - -- irc: bandali on [[https://freenode.net][freenode]] and [[https://wiki.mozilla.org/IRC][moznet]] -- xmpp: {{{xmpp(bandali@member.fsf.org)}}} -- matrix: [[https://matrix.to/#/@bandali:matrix.org][@bandali:matrix.org]] -- fediverse: [[https://pleroma.site/users/aminb][aminb@pleroma.site]] - -*** Other online places - -- [[https://git.sr.ht/~bandali][bandali]] on [[https://sr.ht][sr.ht]] -- [[https://savannah.gnu.org/users/bandali][bandali]] on Savannah -- [[https://lobste.rs/u/bandali][bandali]] on Lobsters -- [[https://hackage.haskell.org/user/bandali][bandali]] on Hackage -- [[https://gitlab.com/bandali][bandali]] on GitLab -- [[https://keybase.io/bandali][bandali]] on Keybase -- [[https://news.ycombinator.com/user?id=bandali][bandali]] on HN -- [[https://www.reddit.com/u/bandali][bandali]] on Reddit - -*** Dormant accounts - -These are accounts I don't use anymore, unless absolutely necessary. - -- [[https://functional.cafe/@a][a]] on functional.cafe -- [[https://mastodon.social/@aminb][aminb]] on mastodon.social -- [[https://savannah.gnu.org/users/aminb][aminb]] on Savannah -- [[https://hackage.haskell.org/user/aminb][aminb]] on Hackage -- [[https://github.com/aminb][aminb]] on GitHub -- [[https://www.reddit.com/u/aminb][aminb]] on Reddit -- [[https://twitter.com/aminban][aminban]] on Twitter - -** Colophon -:PROPERTIES: -:EXPORT_FILE_NAME: colophon -:END: - -#+macro: light @@html:@@ -#+macro: ccbysa @@html:Creative Commons Attribution-ShareAlike 4.0 International @@{{{ccbysa-img}}}@@html:@@ -#+macro: ccbysa-img @@html:Creative Commons Licence@@ - -This is my personal website, previous versions of which I've ran on -different domains since 2012. I've previously used Octopress, Jekyll, -a [[https://github.com/aminb/blog-old][custom]] static site generator written in Haskell (kudos to [[https://ruudvanasseldonk.com][Ruud van -Asseldonk]]), [[https://www.romanzolotarev.com/ssg.html][ssg]] (shout out to [[https://www.romanzolotarev.com][Roman Zolotarev]]), and [[https://orgmode.org/manual/Publishing.html][org-publish]] (see -also [[https://ambrevar.xyz/blog-architecture/index.html][A blog in pure Org/Lisp]]); but I've since ported it to [[https://ox-hugo.scripter.co/][ox-hugo]], a -"carefully crafted Org exporter back-end for Hugo" (kudos to [[https://scripter.co][Kaushal -Modi]]). I've never been happier with my setup. - -The sources are available at [[https://git.aminb.org/aminb.org]]. On each -=git push=, the repository is mirrored from my personal server to my -sr.ht account, the site is then automatically generated using the -[[https://builds.sr.ht][builds.sr.ht]] service (see the [[https://git.aminb.org/aminb.org/tree/.build.yml][=.build.yml=]] build manifest), and is -deployed back to my server, where it's served using [[https://www.nginx.com][Nginx]] on [[https://www.debian.org][Debian -GNU/Linux]]. - -*** Night mode - -To toggle night mode, click on {{{light}}}, which is always available -on the top navigation menu. It saves its state in a browser cookie, -other than that no JavaScript is required to use this website. - -*** Copyright and Licenses -:PROPERTIES: -:CUSTOM_ID: copyright -:END: - -The source code for this site is licensed under version 3 (or, at your -option, any later version) of the [[https://gnu.org/licenses/gpl.html][GNU General Public License]] (see the -[[https://git.aminb.org/aminb.org/tree/COPYING][=COPYING=]] file). The contents of the website are licensed under a -{{{ccbysa}}} license. - -*** i2p angel -:PROPERTIES: -:CUSTOM_ID: i2pangel -:END: - -The favicons were derived from [[https://psychosoma.tech][nether]]'s beautiful [[https://psychosoma.tech/me/work/i2pangel.png][i2p angel]], a copy of -which is displayed on [[https://git.aminb.org][git.aminb.org]]. - -** GPG -:PROPERTIES: -:EXPORT_FILE_NAME: gpg -:END: - -My [[https://aminb.org/0xA21A020248816103.txt][current key]] is:[fn:1] - -#+begin_src txt -pub rsa4096 2018-10-17 [C] [expires: 2020-10-16] - BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103 -uid [ultimate] Amin Bandali -sub rsa4096 2018-10-17 [S] [expires: 2020-10-16] - 39B3 3C8D 9448 0D2D DCC2 A498 8B44 A0CD C7B9 56F2 -sub rsa4096 2018-10-17 [E] [expires: 2020-10-16] - 43ED 5F7C F5EC CBDF 2552 FE98 1D52 D14E BCF3 BE08 -sub rsa4096 2018-10-17 [A] [expires: 2020-10-16] - 70FB 9AAD 5240 2841 2B14 8685 4040 DFEC 6EC1 3F3A -#+end_src - -My [[https://aminb.org/0xD1FBA36627D65876.txt][previous key]], from which I transitioned away, is: - -#+begin_src txt -pub rsa4096 2018-08-05 [C] [expires: 2018-11-16] - CDDE 75F9 0353 8E71 813C DA27 D1FB A366 27D6 5876 -uid [ultimate] Amin Bandali -uid [ultimate] Amin Bandali -uid [ultimate] Amin Bandali -uid [ultimate] Amin Bandali -sub rsa4096 2018-08-05 [S] [expires: 2018-11-16] - E14F 56EE 1338 901E A8A8 D2DD 91A9 6FF7 FEF6 BEB4 -sub rsa4096 2018-08-05 [E] [expires: 2018-11-16] - F9B3 BA24 31A0 9B38 31A3 42EF 1F29 83A9 9A69 D453 -sub rsa4096 2018-08-05 [A] [expires: 2018-11-16] - 4FB5 D03D A65E 8DA3 39BE 5EDD 6DC3 8F21 4E4B AAA0 -#+end_src - -You can obtain my key transition statement signed with both of the -above keys from https://aminb.org/key-transition-2018-10-17.txt. - -*** Older keys - -#+begin_src txt -pub rsa4096 2016-01-31 [SC] [expires: 2019-02-13] - 500C 1D55 D1EC 1FED E8C0 C8DE 4E05 246A B0BF 7FFB -uid [ultimate] Amin Bandali -uid [ultimate] Amin Bandali -uid [ultimate] Amin Bandali -uid [ultimate] Amin Bandali -sub rsa4096 2016-01-31 [S] [expires: 2019-02-13] - 5AC5 0B1B D540 A902 D4B6 2B5C DAE5 4A52 337F 0283 -sub rsa4096 2016-01-31 [E] [expires: 2019-02-13] - F05B FB25 77C7 5AF6 7783 A66F 3351 056A ACD6 6B1F -sub rsa4096 2016-01-31 [A] [expires: 2019-02-13] - C165 6BE2 FDCA D028 0D5A 4314 3A4A C417 58E9 C177 -#+end_src - -The key transition statement I'd generated when transitioning away -from this key is available on -https://aminb.org/key-transition-2018-08-17.txt. - -** Search -:PROPERTIES: -:EXPORT_HUGO_SECTION: / -:EXPORT_FILE_NAME: search -:EXPORT_HUGO_LAYOUT: search -:EXPORT_HUGO_OUTPUTS: html json -:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :sitemap '((priority . 0.1)) -:END: -Results from static site search implemented using /Fusejs/, /jquery/ -and /mark.js/. -- [[https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae][Source]] - -* Posts -:PROPERTIES: -:EXPORT_HUGO_SECTION: post -:EXPORT_HUGO_AUTO_SET_LASTMOD: t -:END: - -** Arch GNU/Linux on MacBook Air 2013 :arch:macbook: -:PROPERTIES: -:EXPORT_FILE_NAME: arch-macbook-air -:EXPORT_DATE: 2016-11-01 -:EXPORT_OPTIONS: ^:{} -:EXPORT_HUGO_ALIASES: /2016/11/arch-macbook-air -:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :toc true -:END: - -This post summarizes how I install and dual-boot Arch GNU/Linux with -Full-Disk Encryption alongside macOS. It is not meant to be a -replacement for the [[https://wiki.archlinux.org/index.php/installation_guide][Installation Guide]] or the former [[https://csdietz.github.io/arch-beginner-guide/][Beginner's Guide]]. -Rather, it mostly serves as a small summary with a few useful notes -about the gotchas. - -So, make sure you understand what you type into your terminal. If you -don't, checking out the Arch wiki should probably be your first step. - -/Note:/ you will need internet access throughout the installation and -the MacBook Air's WiFi doesn't work out of the box on Arch. I -recommend using your phone's USB Tethering (if it does support it), or -using an Ethernet-USB adapter. - -*** Shrinking the macOS partition - -The first step I take is resizing the HFS+ macOS partition to make -room for the new {{{abbr(GNU/Linux)}}} installation. There are plenty -of tutorials on how to do this using macOS's Disk Utility, so do that -and then come back! - -*** Creating a bootable Arch Installer USB - -There are different ways of creating a bootable Arch USB, all -documented on the [[https://wiki.archlinux.org/index.php/USB_flash_installation_media][USB flash installation media]] page on the Arch wiki, -but the simplest one is using =dd= if you already have access to -another UNIX system. - -{{{span(red,Warning:)}}} make sure you backup the data on your flash -drive, as =dd= will irrevocably destroy all data on it. - -Use =lsblk= to find the name (block device) of your USB drive, then -run =dd= (as root) as shown below: - -#+begin_src bash -dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync -#+end_src - -Replace =/path/to/archlinux.iso= with the path to the Arch image you -have downloaded, and =/dev/sdx= with your drive. - -*** Booting up from the USB - -After creating the install USB, reboot your laptop and hold the alt -key and boot into the USB. - -When booting is complete and you're presented with the prompt, it's a -good time to make sure you're connected to the internet (see the -/note/ at the top of this post). - -Use =ping= to verify that you've established a connection: - -#+begin_src bash -ping archlinux.org -#+end_src - -*** Updating the system clock - -Once you're connected to the internet, make sure the system clock is -accurate: - -#+begin_src bash -timedatectl set-ntp true # start and enable systemd-timesyncd -#+end_src - -You can check the service status using =timedatectl status=. - -*** Partitioning -:PROPERTIES: -:CUSTOM_ID: partitioning -:END: - -I won't dive into partitioning and instead, I'll refer you to the -[[https://wiki.archlinux.org/index.php/Partitioning][Partitioning]] page of Arch wiki. Of the available partitioning tools, I -personally prefer =cfdisk=. - -*** Setting up LVM & LUKS - -I use a [[https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#LVM_on_LUKS][LVM on LUKS]] setup, where I set up LVM on top of the encrypted -partition. - -First, let's set up the underlying encrypted partition: - -#+begin_src bash -cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 \ - --iter-time 5000 --use-urandom -y luksFormat /dev/sdaX -#+end_src - -where =/dev/sdaX= is the partition you created in the last step -(e.g. =/dev/sda4=). For more information about the =cryptsetup= -options, see the [[https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption#Encryption_options_for_LUKS_mode][LUKS encryption options]]. - -Then we open the container: - -#+begin_src bash -cryptsetup open --type luks /dev/sdaX lvm -#+end_src - -Now it's time to use lvm and prepare the logical volume(s): - -#+begin_src bash -pvcreate /dev/mapper/lvm -vgcreate vg /dev/mapper/lvm -lvcreate --extents +100%FREE -n root vg -#+end_src - -This will create a physical volume on the mapping we just opened, -create a volume group named =vg= on the physical volume, and create a -logical volume named =root= that spans the entire volume group. More -complex setups are possible thanks to the great flexibility of lvm. - -We now format the logical volume with =ext4=: - -#+begin_src bash -mkfs.ext4 /dev/mapper/vg-root -#+end_src - -*** Installing the base system - -Let's mount the logical volume, make a directory for the mount point -of the boot partition, and mount the boot partition (=/dev/sda1=): - -#+begin_src bash -mount /dev/mapper/vg-root /mnt -mkdir /mnt/boot -mount /dev/sda1 /mnt/boot -#+end_src - -Finally, let's install the base system (and optionally =base-devel=): - -#+begin_src bash -pacstrap /mnt base base-devel -#+end_src - -*** Configuring the system - -Let's generate the fstab: - -#+begin_src bash -genfstab -U /mnt >> /mnt/etc/fstab -#+end_src - -Use your favorite terminal-based editor, edit the fstab file and add -the =discard= option for the root partition to enable TRIM on the SSD. - -Now we change root into our newly installed system and will configure -it. Adjust these according to your own setup. - -#+begin_src bash -arch-chroot /mnt /bin/bash -passwd # set the root password -echo myhostname > /etc/hostname # set the hostname -ln -s /usr/share/zoneinfo/Canada/Eastern /etc/localtime # time zone -hwclock --systohc --utc # write system clock to hardware clock (UTC) -useradd -m -G wheel -s /bin/bash myuser # create myuser -passwd myuser # set the password for myuser -echo "myuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/myuser -# uncomment en_US.UTF-8 UTF-8 and other needed locales in /etc/locale.gen -locale-gen -echo LANG=en_US.UTF-8 > /etc/locale.conf -export LANG=en_US.UTF-8 -#+end_src - -Then adjust the initramfs hooks in =/etc/mkinitcpio.conf= and enable -the =encrypt= and =lvm2= hooks, and make sure =keyboard= is available -before =encrypt= so you can actually type in the LUKS password when -booting. Your =HOOKS= line should look similar to this: - -#+begin_src -HOOKS="base udev autodetect modconf block keyboard encrypt lvm2 filesystems fsck" -#+end_src - -After adjusting the hooks, build the initramfs: - -#+begin_src bash -mkinitcpio -p linux -#+end_src - -Now, install the =intel-ucode= package. We'll configure the bootloader -to enable intel microcode updates. - -#+begin_src bash -pacman -S intel-ucode -#+end_src - -Create the =/boot/loader/loader.conf= with the following content -(adjust the timeout to your liking): - -#+begin_src -default arch -timeout 3 -#+end_src - -Then create the entry for Arch: - -#+begin_src bash -mkdir -p /boot/loader/entries -touch /boot/loader/entries/arch.conf -#+end_src - -Now edit =/boot/loader/entries/arch.conf= to specify the Arch entry: - -#+begin_src -title Arch GNU/Linux -linux /vmlinuz-linux -initrd /intel-ucode.img -initrd /initramfs-linux.img -options cryptdevice=/dev/sdaX:vg:allow-discards root=/dev/mapper/vg-root rw -#+end_src - -Again, =/dev/sdaX= is the partition you created in the [[#partitioning][partitioning]] -step as the underlying encrypted partition. - -Finally, install the bootloader, exit the chroot, umount and reboot! - -#+begin_src bash -bootctl install -exit -umount -R /mnt -reboot -#+end_src - -*** Post-installation recommendations - -Congratulations! You now have a minimal Arch installation. - -At this point, I usually install my favorite AUR helper, [[https://aur.archlinux.org/packages/pacaur/][pacaur]], then -I install the [[https://aur.archlinux.org/packages/broadcom-wl-dkms/][broadcom-wl-dkms]] wireless driver and [[https://aur.archlinux.org/packages/mba6x_bl-dkms/][mba6x_bl-dkms]] -backlight driver to fix the post suspend/resume issue where three's no -brightness after waking up from suspend, and the only available -brightness would be 100%. - -#+begin_src bash -pacaur -S linux-headers dkms # linux-headers is required for dkms -pacaur -S broadcom-wl-dkms -pacaur -S mba6x_bl-dkms -#+end_src - -Then, I'd like to install - -- input, graphics, and sound drivers, -- a desktop environment (I prefer Xfce or LXQt), -- a display manager for login screen (lightdm or sddm), and -- a network manager (NetworkManager or ConnMan). - -Check out the [[https://wiki.archlinux.org/index.php/General_recommendations][General recommendations]] for more details. - -*** References - -Here are some resources I've come across each with lots of useful bits -and pieces, about installing Arch on a MacBook: - -- [[https://github.com/pandeiro/arch-on-air][pandeiro/arch-on-air]] -- [[https://loicpefferkorn.net/2015/01/arch-linux-on-macbook-pro-retina-2014-with-dm-crypt-lvm-and-suspend-to-disk/][Arch Linux on MacBook Pro Retina 2014 with DM-Crypt, LVM and suspend to disk]] -- [[http://frankshin.com/installing-archlinux-on-macbook-air-2013/][Installing Archlinux on Macbook Air 2013]] -- [[http://panks.me/posts/2013/06/arch-linux-installation-with-os-x-on-macbook-air-dual-boot/][Arch Linux Installation with OS X on Macbook Air (Dual Boot)]] -- [[https://visual-assault.org/2016/03/05/install-encrypted-arch-linux-on-apple-macbook-pro/][Installing (encrypted) Arch Linux on an Apple MacBook Pro]] -- [[http://alexeyzabelin.com/arch-on-mac][Installing Arch Linux on a MacBook Air 2013]] -- [[https://medium.com/phils-thought-bubble-of-recent-stuff/arch-linux-running-on-my-macbook-2ea525ebefe3][Arch Linux running on my MacBook]] -- [[http://codylittlewood.com/arch-linux-on-macbook-pro-installation/][Dual boot Arch Linux on MacBook Pro Installation]] - - -* Footnotes - -[fn:1] Key summaries generated by including the =--list-key=, -=--with-fingerprint=, and =--with-subkey-fingerprint= switches along -with the key id when calling =gpg=. - -* COMMENT Local Variables :ARCHIVE: -# Local Variables: -# eval: (org-hugo-auto-export-mode) -# org-hugo-footer: "\n\n[//]: # \"Exported with love from a post written in Org mode\"\n[//]: # \"- https://ox-hugo.scripter.co\"" -# End: diff --git a/posts/arch-macbook-air.md b/posts/arch-macbook-air.md deleted file mode 100644 index 17d5d9b..0000000 --- a/posts/arch-macbook-air.md +++ /dev/null @@ -1,268 +0,0 @@ -title: Arch GNU/Linux on MacBook Air 2013 -date: 2016-11-01 00:00 -slug: arch-macbook-air -tags: arch, macbook -copyright: 2016, 2019 ---- - -This post summarizes how I install and dual-boot Arch GNU/Linux with -Full-Disk Encryption alongside macOS. It is not meant to be a -replacement for the [Installation -Guide](https://wiki.archlinux.org/index.php/installation%5Fguide) or -the former [Beginner's -Guide](https://csdietz.github.io/arch-beginner-guide/). Rather, it -mostly serves as a small summary with a few useful notes about the -gotchas. - -So, make sure you understand what you type into your terminal. If you -don't, checking out the Arch wiki should probably be your first step. - -_Note:_ you will need internet access throughout the installation and -the MacBook Air's WiFi doesn't work out of the box on Arch. I -recommend using your phone's USB Tethering (if it does support it), or -using an Ethernet-USB adapter. - -## Shrinking the macOS partition - -The first step I take is resizing the HFS+ macOS partition to make -room for the new GNU/Linux installation. There are plenty of -tutorials on how to do this using macOS's Disk Utility, so do that and -then come back! - -## Creating a bootable Arch Installer USB - -There are different ways of creating a bootable Arch USB, all -documented on the [USB flash installation -media](https://wiki.archlinux.org/index.php/USB%5Fflash%5Finstallation%5Fmedia) -page on the Arch wiki, but the simplest one is using `dd` if you -already have access to another UNIX system. - -**Warning:** make sure you backup the data on your flash drive, as -`dd` will irrevocably destroy all data on it. - -Use `lsblk` to find the name (block device) of your USB drive, then -run `dd` (as root) as shown below: - -```bash -dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync -``` - -Replace `/path/to/archlinux.iso` with the path to the Arch image you -have downloaded, and `/dev/sdx` with your drive. - -## Booting up from the USB - -After creating the install USB, reboot your laptop and hold the alt -key and boot into the USB. - -When booting is complete and you're presented with the prompt, it's a -good time to make sure you're connected to the internet (see the -_note_ at the top of this post). - -Use `ping` to verify that you've established a connection: - -```bash -ping archlinux.org -``` - -## Updating the system clock - -Once you're connected to the internet, make sure the system clock is -accurate: - -```bash -timedatectl set-ntp true # start and enable systemd-timesyncd -``` - -You can check the service status using `timedatectl status`. - -## Partitioning - -I won't dive into partitioning and instead, I'll refer you to the -[Partitioning](https://wiki.archlinux.org/index.php/Partitioning) page -of Arch wiki. Of the available partitioning tools, I personally prefer -`cfdisk`. - -## Setting up LVM & LUKS - -I use a [LVM on -LUKS](https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting%5Fan%5Fentire%5Fsystem#LVM%5Fon%5FLUKS) -setup, where I set up LVM on top of the encrypted partition. - -First, let's set up the underlying encrypted partition: - -```bash -cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 \ - --iter-time 5000 --use-urandom -y luksFormat /dev/sdaX -``` - -where `/dev/sdaX` is the partition you created in the last step -(e.g. `/dev/sda4`). For more information about the `cryptsetup` -options, see the [LUKS encryption -options](https://wiki.archlinux.org/index.php/Dm-crypt/Device%5Fencryption#Encryption%5Foptions%5Ffor%5FLUKS%5Fmode). - -Then we open the container: - -```bash -cryptsetup open --type luks /dev/sdaX lvm -``` - -Now it's time to use lvm and prepare the logical volume(s): - -```bash -pvcreate /dev/mapper/lvm -vgcreate vg /dev/mapper/lvm -lvcreate --extents +100%FREE -n root vg -``` - -This will create a physical volume on the mapping we just opened, -create a volume group named `vg` on the physical volume, and create a -logical volume named `root` that spans the entire volume group. More -complex setups are possible thanks to the great flexibility of lvm. - -We now format the logical volume with `ext4`: - -```bash -mkfs.ext4 /dev/mapper/vg-root -``` - -## Installing the base system - -Let's mount the logical volume, make a directory for the mount point -of the boot partition, and mount the boot partition (`/dev/sda1`): - -```bash -mount /dev/mapper/vg-root /mnt -mkdir /mnt/boot -mount /dev/sda1 /mnt/boot -``` - -Finally, let's install the base system (and optionally `base-devel`): - -```bash -pacstrap /mnt base base-devel -``` - -## Configuring the system - -Let's generate the fstab: - -```bash -genfstab -U /mnt >> /mnt/etc/fstab -``` - -Use your favorite terminal-based editor, edit the fstab file and add -the `discard` option for the root partition to enable TRIM on the SSD. - -Now we change root into our newly installed system and will configure -it. Adjust these according to your own setup. - -```bash -arch-chroot /mnt /bin/bash -passwd # set the root password -echo myhostname > /etc/hostname # set the hostname -ln -s /usr/share/zoneinfo/Canada/Eastern /etc/localtime # time zone -hwclock --systohc --utc # write system clock to hardware clock (UTC) -useradd -m -G wheel -s /bin/bash myuser # create myuser -passwd myuser # set the password for myuser -echo "myuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/myuser -# uncomment en_US.UTF-8 UTF-8 and other needed locales in /etc/locale.gen -locale-gen -echo LANG=en_US.UTF-8 > /etc/locale.conf -export LANG=en_US.UTF-8 -``` - -Then adjust the initramfs hooks in `/etc/mkinitcpio.conf` and enable -the `encrypt` and `lvm2` hooks, and make sure `keyboard` is available -before `encrypt` so you can actually type in the LUKS password when -booting. Your `HOOKS` line should look similar to this: - -```nil -HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck) -``` - -After adjusting the hooks, build the initramfs: - -```bash -mkinitcpio -p linux -``` - -Create the `/boot/loader/loader.conf` with the following content -(adjust the timeout to your liking): - -```nil -default arch -timeout 3 -``` - -Then create the entry for Arch: - -```bash -mkdir -p /boot/loader/entries -touch /boot/loader/entries/arch.conf -``` - -Now edit `/boot/loader/entries/arch.conf` to specify the Arch entry: - -```nil -title Arch GNU/Linux -linux /vmlinuz-linux -initrd /intel-ucode.img -initrd /initramfs-linux.img -options cryptdevice=/dev/sdaX:vg:allow-discards root=/dev/mapper/vg-root rw -``` - -Again, `/dev/sdaX` is the partition you created in the partitioning -step earlier as the underlying encrypted partition. - -Finally, install the bootloader, exit the chroot, umount and reboot! - -```bash -bootctl install -exit -umount -R /mnt -reboot -``` - -## Post-installation recommendations - -Congratulations! You now have a minimal Arch installation. - -At this point, I usually install my favorite AUR helper, -[pacaur](https://aur.archlinux.org/packages/pacaur/), then I install -the -[mba6x\_bl-dkms](https://aur.archlinux.org/packages/mba6x%5Fbl-dkms/) -backlight driver to fix the post suspend/resume issue where there's no -brightness after waking up from suspend, and the only available -brightness would be 100%. - -```bash -pacaur -S linux-headers dkms # linux-headers is required for dkms -pacaur -S broadcom-wl-dkms -pacaur -S mba6x_bl-dkms -``` - -Then, I'd like to install - -- input, graphics, and sound drivers, -- a desktop environment (I prefer Xfce or LXQt), -- a display manager for login screen (lightdm or sddm), and -- a network manager (NetworkManager or ConnMan). - -Check out the [General -recommendations](https://wiki.archlinux.org/index.php/General%5Frecommendations) -for more details. - -## References - -Here are some resources I've come across each with lots of useful bits -and pieces, about installing Arch on a MacBook: - -- [pandeiro/arch-on-air](https://github.com/pandeiro/arch-on-air) -- [Arch Linux on MacBook Pro Retina 2014 with DM-Crypt, LVM and suspend to disk](https://loicpefferkorn.net/2015/01/arch-linux-on-macbook-pro-retina-2014-with-dm-crypt-lvm-and-suspend-to-disk/) -- [Installing Archlinux on Macbook Air 2013](http://frankshin.com/installing-archlinux-on-macbook-air-2013/) -- [Arch Linux Installation with OS X on Macbook Air (Dual Boot)](http://panks.me/posts/2013/06/arch-linux-installation-with-os-x-on-macbook-air-dual-boot/) -- [Installing (encrypted) Arch Linux on an Apple MacBook Pro](https://visual-assault.org/2016/03/05/install-encrypted-arch-linux-on-apple-macbook-pro/) -- [Installing Arch Linux on a MacBook Air 2013](http://alexeyzabelin.com/arch-on-mac) -- [Arch Linux running on my MacBook](https://medium.com/phils-thought-bubble-of-recent-stuff/arch-linux-running-on-my-macbook-2ea525ebefe3) -- [Dual boot Arch Linux on MacBook Pro Installation](http://codylittlewood.com/arch-linux-on-macbook-pro-installation/) diff --git a/posts/bandali-computing.md b/posts/bandali-computing.md deleted file mode 100644 index fefaeb5..0000000 --- a/posts/bandali-computing.md +++ /dev/null @@ -1,57 +0,0 @@ -title: How I do my Computing -date: 2019-09-14 00:35 -slug: bandali-computing -tags: computing -updated: 2019-11-30 21:16 -copyright: 2019 ---- - -(Inspired by computing pages of [rms][stallman-computing] -and [Leah Rowe][leah-computing]) - -## Computers - -My main computer is a soon-to-be-[librebooted](https://libreboot.org) -ThinkPad X200. This is the machine I use the most in or out the -house. I also own and occasionally use a Dell XPS 15 more as a -“Desktop”, and a ThinkPad X220T tablet I use when reading (and -annotating) research papers. - -I also have the privilege of having access to a fleet of beefy servers -through our school’s [Computer Science Club][csc], which I use for -some heavier computations every now and again. - -## GNU/Linux distros - -I’ve used a large number of GNU/Linux distributions throughout the -years, but as of late, my favourite distros are [Guix System][guix], -[Trisquel][trisquel], and [Debian][debian] (with no `contrib` or -`non-free`). I mostly use the [GNU Linux-libre][linux-libre] kernel. -Guix System comes with GNU Linux-libre out of the box, and on -Debian-based distros I install it from jxself’s -[APT repository][jxself-apt]. - -## Actual computing - -I spend most of my time in [GNU Emacs][gnu-emacs]. - -TODO: elaborate - -## Cell phone - -I have an old Nexus 5 I reluctantly use from time to time. It runs -LineageOS+microG without GApps. Sadly it still requires some blobs -for functioning. I can’t wait for lxo’s [0G][0G] to become a reality -fast enough :) - - -[stallman-computing]: https://stallman.org/stallman-computing.html -[leah-computing]: https://blog.vimuser.org/leah-computing.html -[csc]: https://csclub.uwaterloo.ca -[guix]: https://guix.gnu.org -[trisquel]: https://trisquel.info -[debian]: https://www.debian.org -[linux-libre]: https://www.fsfla.org/ikiwiki/selibre/linux-libre/ -[jxself-apt]: https://jxself.org/linux-libre/ -[gnu-emacs]: https://www.gnu.org/software/emacs/ -[0G]: https://www.fsfla.org/ikiwiki/blogs/lxo/pub/0G diff --git a/reset.css b/reset.css deleted file mode 100644 index ed11813..0000000 --- a/reset.css +++ /dev/null @@ -1,48 +0,0 @@ -/* http://meyerweb.com/eric/tools/css/reset/ - v2.0 | 20110126 - License: none (public domain) -*/ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -}