to verify:
July 27, 2026 · View on GitHub
#+name: Dotfield #+author: Chris Montgomery chmont@protonmail.com #+language: en
#+begin_quote The map is open and connectable in all of its dimensions; it is detachable, reversible, susceptible to constant modification. ... The map has to do with performance, whereas the tracing always involves an alleged "competence". #+end_quote
You are currently viewing the README for someone's collection of personal computer system configurations.
These are personal configurations and are not intended for anyone else's direct usage. I do not recommend starting a journey by copying someone else's world-view and claiming it as your own—beware all frameworks!—but I do recommend considering multiple perspectives as you develop your own. Perhaps you will find some ideas contained in this project helpful in your own computing experiments. While there is and never will be a warranty, I will gladly discuss or attempt to address any questions.
Dotfield does not embody "best practices" or "the right way to Nix". The project exists as an evolving and unstable result of one amateur's take on identifying and implementing flexible and understandishable patterns or novelties across other sources this amateur has encountered.
If you have questions or feedback, feel free to reach out in the issues or discussions!
- Bootstrapping :PROPERTIES: :CUSTOM_ID: bootstrapping :END:
This section is incomplete, fragmented, and I don't remember writing it. However, it seems to contain important reference notes for stuff I always forget.
** NixOS :PROPERTIES: :CUSTOM_ID: nixos :END:
*** Setup :PROPERTIES: :CUSTOM_ID: setup :END:
#+begin_src sh
nix-env -f '
*** Partitioning and formatting :PROPERTIES: :CUSTOM_ID: partitioning-and-formatting :END:
**** Option 1: Disko
#+begin_src sh curl "https://raw.githubusercontent.com/astratagem/dotfield/${GIT_BRANCH}/machines/${NEW_HOSTNAME}/disk-config.nix" -o /tmp/disk-config.nix nix run github:nix-community/disko -- --mode disko /tmp/disk-config.nix
to verify:
mount | grep /mnt #+end_src
**** Option 2: Manually ***** TODO copy rough commands from moraine provisioning script
*** Configurate :PROPERTIES: :CUSTOM_ID: configurate :END: #+begin_src sh git clone https://github.com/astratagem/dotfield.git -b "${GIT_BRANCH}" /mnt/etc/nixos
absolute paths from /mnt would break once booted into the system
cd /mnt/etc && ln -s nixos dotfield && cd nixos nixos-generate-config --no-filesystems --root /mnt #+end_src
Integrate any missing configuration from the generator locally, push to remote, and pull on the host.
*** Install :PROPERTIES: :CUSTOM_ID: install :END:
#+begin_src sh nixos-install --flake ".#${NEW_HOSTNAME}" #+end_src
After rebooting, edit =~/.ssh/known_hosts= on your local machine to remove the initial entries since the host keys have been reset after installation.
*** Record Public Keys :PROPERTIES: :CUSTOM_ID: record-public-keys :END:
#+begin_src sh export KEYS_DIR="$PRJ_ROOT/ops/keys" export NEW_HOSTNAME=<...> export NEW_HOSTIP=<...>
ssh root@$NEW_HOSTIP -t 'cat /etc/ssh/ssh_host_ed25519_key.pub' \
"NEW_HOSTNAME.pub"
ssh root@$NEW_HOSTIP -t 'cat /etc/ssh/ssh_host_rsa_key.pub' \
"NEW_HOSTNAME-rsa.pub"
nix run nixpkgs#ssh-to-age -- -i "NEW_HOSTNAME.pub"
| tr --delete '\n' \
"NEW_HOSTNAME.txt"
git add $KEYS_DIR #+end_src
*** Update Secret Recipients :PROPERTIES: :CUSTOM_ID: update-secret-recipients :END:
Add the host to =//.sops.yaml=, then:
#+begin_src sh direnv reload grep "PRJ_ROOT/.sops.yaml --before-context=10 sops updatekeys secrets/global.secrets.yaml #+end_src
** TODO Generic Linux :PROPERTIES: :CUSTOM_ID: generic-linux :END:
** Secrets :PROPERTIES: :CUSTOM_ID: secrets :END:
After the initial generation with secrets disabled (due to a catch-22/bootstrapping problem), you should then be able to do the following with a smartcard attached.
#+begin_src sh export KEYID="0x135EEDD0F71934F3" gpg --recv $KEYID gpg --list-secret-keys gpg-agent-restart
mkdir -p $XDG_CONFIG_HOME/sops/age
Required for editing sops files
pass show age--secret-key >> $XDG_CONFIG_HOME/sops/age/keys #+end_src
- Structure :PROPERTIES: :CUSTOM_ID: structure :END:
I still don't know what I'm doing. Maybe one day I will have enough of an idea that I can write it down with any amount of coherence. Or maybe I'm doing it all backwards...?
- Systems :PROPERTIES: :CUSTOM_ID: systems :END:
** =tuvok= (NixOS) / =tuvix= (macOS) [MacBook Air M2] :PROPERTIES: :CUSTOM_ID: tuvix-macbook-air-m2 :END:
Work laptop running NixOS via [[https://github.com/tpwrules/nixos-apple-silicon/][github:tpwrules/nixos-apple-silicon]] via Asahi Linux kernel. It's amazing. 10/10 would recommend. Daily driver.
I would give it 11/10 but I have issues with audio input/output on video calls, and I had to get a DisplayLink hub to use an external display monitor. Those aren't dealbreaking issues because I know that the Asahi Linux people are working on improving those things and I have workarounds for the time being.
** =ryosuke= [Teenage Engineering Computer-1] :PROPERTIES: :CUSTOM_ID: ryosuke-teenage-engineering-computer-1 :END:
Ryosuke is a "ghost of the circuit", a denizen of Kairo, LoBE.
[[https://pcpartpicker.com/list/pXZ9nt][PCPartPicker Part List]]
| Type | Item | |----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | CPU | [[https://pcpartpicker.com/product/KwLwrH/amd-ryzen-9-5900x-37-ghz-12-core-processor-100-100000061wof][AMD Ryzen 9 5900X 3.7 GHz 12-Core Processor]] | | CPU Cooler | [[https://pcpartpicker.com/product/DZfhP6/noctua-nh-l9a-am4-338-cfm-cpu-cooler-nh-l9a-am4][Noctua NH-L9a-AM4 33.84 CFM CPU Cooler]] | | Motherboard | [[https://pcpartpicker.com/product/s792FT/gigabyte-x570si-aorus-pro-ax-mini-itx-am4-motherboard-x570si-aorus-pro-ax][Gigabyte X570SI AORUS PRO AX Mini ITX AM4 Motherboard]] | | Memory | [[https://pcpartpicker.com/product/Yg3mP6/corsair-vengeance-lpx-32-gb-2-x-16-gb-ddr4-3600-memory-cmk32gx4m2d3600c18][Corsair Vengeance LPX 32 GB (2 x 16 GB) DDR4-3600 CL18 Memory]] | | Storage | [[https://pcpartpicker.com/product/Zxw7YJ/samsung-970-evo-plus-1-tb-m2-2280-nvme-solid-state-drive-mz-v7s1t0bam][Samsung 970 Evo Plus 1 TB M.2-2280 NVME Solid State Drive]] | | Video Card | [[https://pcpartpicker.com/product/DxjBD3/powercolor-radeon-rx-6500-xt-4-gb-itx-video-card-axrx-6500xt-4gbd6-dh][PowerColor Radeon RX 6500 XT 4 GB ITX Video Card]] | | Case | [[https://pcpartpicker.com/product/sdRYcf/teenage-engineering-computer-1-mini-itx-desktop-case-te030as001][teenage engineering Computer-1 Mini ITX Desktop Case]] | | Power Supply | [[https://pcpartpicker.com/product/BtsmP6/corsair-sf-600w-80-platinum-certified-fully-modular-sfx-power-supply-cp-9020182-na][Corsair SF 600 W 80+ Platinum Certified Fully Modular SFX Power Supply]] | | Case Fan | [[https://pcpartpicker.com/product/Jdwkcf/noctua-nf-a8-pwm-chromaxblackswap-3267-cfm-80-mm-fan-nf-a8-pwm-chromaxblackswap][Noctua A8 PWM chromax.black.swap 32.67 CFM 80 mm Fan]] |
The Ryzen 9 5900X processor and mini-ITX Teenage Engineering Computer-1 case are the stars here.
As of <2024-01-22>, Ryosuke is serving as a living room HTPC. I've also brough it to the office as a "laptop".
** =boschic= (NixOS) / =DORE= (Windows) :PROPERTIES: :CUSTOM_ID: boschic :END:
A towering fiend.
Originally built in 2015, recently revamped.
[[https://pcpartpicker.com/list/LKQQRv][PCPartPicker Part List]]
| Type | Item | |----------------------------+------------------------------------------------------------------------| | CPU | [[https://pcpartpicker.com/product/g94BD3/amd-ryzen-5-5600x-37-ghz-6-core-processor-100-100000065box][AMD Ryzen 5 5600X 3.7 GHz 6-Core Processor]] | | CPU Cooler | [[https://pcpartpicker.com/product/4vzv6h/noctua-nh-d15-825-cfm-cpu-cooler-nh-d15][Noctua NH-D15 82.5 CFM CPU Cooler]] | | Motherboard | [[https://pcpartpicker.com/product/xYvqqs/asus-rog-strix-b450-f-gaming-ii-atx-am4-motherboard-rog-strix-b450-f-gaming-ii][Asus ROG STRIX B450-F GAMING II ATX AM4 Motherboard]] | | Memory | [[https://pcpartpicker.com/product/Yg3mP6/corsair-vengeance-lpx-32-gb-2-x-16-gb-ddr4-3600-memory-cmk32gx4m2d3600c18][Corsair Vengeance LPX 32 GB (2 x 16 GB) DDR4-3600 CL18 Memory]] | | Storage | [[https://pcpartpicker.com/product/63V48d/crucial-internal-hard-drive-ct256mx100ssd1][Crucial MX100 256 GB 2.5” Solid State Drive]] | | Storage | [[https://pcpartpicker.com/product/Fv8j4D/samsung-970-evo-plus-2-tb-m2-2280-nvme-solid-state-drive-mz-v7s2t0bam][Samsung 970 Evo Plus 2 TB M.2-2280 NVME Solid State Drive]] | | Storage | [[https://pcpartpicker.com/product/dCxfrH/seagate-internal-hard-drive-st1000dm003][Seagate BarraCuda 1 TB 3.5” 7200RPM Internal Hard Drive]] | | Video Card | [[https://pcpartpicker.com/product/c2kWGX/nvidia-geforce-rtx-3080-ti-12-gb-founders-edition-video-card-900-1g133-2518-000][NVIDIA GeForce RTX 3080 Ti 12 GB Founders Edition Video Card]] | | Case | [[https://pcpartpicker.com/product/mn3RsY/phanteks-case-phes614pbk][Phanteks Enthoo Pro ATX Full Tower Case]] | | Power Supply | [[https://pcpartpicker.com/product/Yhbp99/corsair-power-supply-ax760][Corsair AX 760 W 80+ Platinum Certified Fully Modular ATX Power Supply]] | | Wireless Network Adapter | [[https://pcpartpicker.com/product/XdcRsY/tp-link-archer-t5e-pcie-x1-80211abgnac-wi-fi-adapter-archer-t5e][TP-Link Archer T5E 802.11a/b/g/n/ac PCIe x1 Wi-Fi Adapter]] |
*** Audio/Video Input/Output :PROPERTIES: :CUSTOM_ID: audiovideo-inputoutput :END:
Workstation desk has the following devices:
| Audio in/out | Focusrite Scarlett 18i20 [Gen 1] Audio Interface/Mixer | | | Video in, Audio (mic) in | Logitech Brio 501 Webcam | |
#+begin_src console seadoom@boschic ~ % dmesg | grep -i -B 3 focusrite [ 1.567008] usb 5-1: New USB device found, idVendor=1235, idProduct=800c, bcdDevice= 4.4c [ 1.567011] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1.567012] usb 5-1: Product: Scarlett 18i20 USB [ 1.567013] usb 5-1: Manufacturer: Focusrite
seadoom@boschic ~ % pw-dump | grep node.name | grep alsa "node.name": "alsa_input.usb-046d_Brio_501_2235LZ52HK58-02.analog-stereo", "node.name": "alsa_output.pci-0000_0c_00.4.iec958-stereo", "node.name": "alsa_input.pci-0000_0c_00.4.analog-stereo", "node.name": "alsa_output.pci-0000_0a_00.1.hdmi-stereo", "node.name": "alsa_output.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-output", "node.name": "alsa_input.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-input",
seadoom@boschic ~ % lspci | grep -i audio 0a:00.1 Audio device: NVIDIA Corporation GA102 High Definition Audio Controller (rev a1) 0c:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
seadoom@boschic ~ % lsusb | grep -i scarlett Bus 005 Device 008: ID 1235:800c Focusrite-Novation Scarlett 18i20 #+end_src
The 18i20 is connected to KRK Rokit 5 studio monitors via the interface's L/R monitor output channels. Unfortunately, ALSA resets the monitor output level to muted status each time the device is reconnected.
See =/var/lib/alsa/asound.state= for the state of ALSA settings as of last boot. According to [[https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#ALSA_and_systemd]], updated values will be written on shutdown.
Possible culprits for the mute status:
(note that this one is not the 18i20, which is USB):
#+begin_example State.Generic { ... control.18 { iface MIXER name 'Auto-Mute Mode' value Enabled comment { access 'read write' type ENUMERATED count 1 item.0 Disabled item.1 Enabled } } ... } #+end_example
And for the 18i20 itself:
#+begin_example State.USB { ... control.9 { iface MIXER name 'Master 1 (Monitor) Playback Switch' value.0 false value.1 false comment { access 'read write' type BOOLEAN count 2 } } ... } #+end_example
Source should be PCM 1
** =HodgePodge= aka the "Sacred Chao" :PROPERTIES: :CUSTOM_ID: hodgepodge-aka-the-sacred-chao :END:
An early-2014 15-inch MacBook Pro who has seen quite the life. Mostly
unused for the past several years due to the availability of more
portable work laptops. It is now living out its life in a declarative
retirement home.
Update [2024-04-10]: This laptop was my primary computer for a couple months until switching to =tuvok= since =aarch64-linux= support has improved since =tuvok='s initial provisioning.
=nixos-rebuild= is very slow, even with the binary cache and =ryosuke= as build host.
*** Specifications :PROPERTIES: :CUSTOM_ID: specifications :END:
MacBookPro11,3 (Late 2013) (Dual-Graphics Retina Display)
| Type | Item | |----------------------+-----------------------------------------------------------------------| | CPU | Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz (4-core) | | Network Controller | Broadcom BCM4360 802.11ac Dual Band Wireless Network Adapter (rev 03) | | Video | NVIDIA Corporation GK107M [GeForce GT 750M Mac Edition] (rev a1) | | Camera | Broadcom 720p FaceTime HD Camera | | Audio | Intel 8 Series / C220 Series HDAC | | Audio | NVIDIA GK107 HDMI Audio Controller | | SATA | Samsung S4LN053X01 AHCI SSD Controller (Apple slot) |
Tip: to determine Apple model within Linux, run =grep -h . /sys/devices/virtual/dmi/id/board_v*=.
**** "Dual-Graphics" :PROPERTIES: :CUSTOM_ID: dual-graphics :END:
Technically, there is also an integrated Intel graphics card in addition to the discrete NVIDIA card. However, Apple decided to force the integrated Intel GPU to be disabled unless running macOS. There are ways around that (apparently rEFInd can help), but I don't think it's worth the extra effort.
This issue was originally reported on the grub-devel mailing list, but it doesn't look like the patch was ever merged (but I don't yet understand how these mailing list workflows operate so it's pretty unclear to me what the actual "status" is).
[[https://lists.gnu.org/archive/html/grub-devel/2013-12/msg00442.html]]
For more info:
- [[https://gist.github.com/stefanocoding/c6dbf4489f330021bd9335d655c9fbbf]]
- [[https://github.com/0xbb/apple_set_os.efi]]
**** Display flickering :PROPERTIES: :CUSTOM_ID: display-flickering :END:
[[https://bbs.archlinux.org/viewtopic.php?id=219442][Flickering with gnome 3.22.2-1 + gdm on macbook pro / Applications & Desktop Environments / Arch Linux Forums]]
Start the machine with the power adapter unplugged (either boot or wake).
#+begin_quote Whenever I've had the flicker today I've fixed it by: Unplug power cable, shut the lid, allow it to suspend (wait for the apple logo light to go out), open the lid, re-plug power cable. This process has removed the flicker the two times I've had it today. #+end_quote
Note that this is not specific to GNOME, but affects KDE Plasma and SDDM too (according to one user's report).
The discussion resulted in a chain of bug reports leading here:
[[https://gitlab.freedesktop.org/drm/amd/-/issues/759]]
The discussion and bug report also pertain to AMD graphics, which doesn't apply to the MacBookPro11,3 model. And yet the power adapter workaround still seems to help resolve the issue with this machine's NVIDIA graphics...
** Incubation :PROPERTIES: :CUSTOM_ID: incubation :END: *** =sommoch= :PROPERTIES: :CUSTOM_ID: sommoch :END:
Dead but dreaming.
Laid to indefinite rest when one of the cats, seeking human attention, chewed through the LCD screen. We did not speak for a week.
Still works, but unusable without external display. Suffers from congenital Butterfly Keyboard Syndrome.