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”.
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!
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.
nix-env -f '<nixpkgs>' -iA nixos-install-tools git bat fd ripgrep tealdeer vim
alias nix="nix --extra-experimental-features 'nix-command flakes'"
export NEW_HOSTNAME=<your-hostname>
export GIT_BRANCH="add-${NEW_HOSTNAME}"curl "https://raw.githubusercontent.com/montchr/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 /mntgit clone https://github.com/montchr/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 /mntIntegrate any missing configuration from the generator locally, push to remote, and pull on the host.
nixos-install --flake ".#${NEW_HOSTNAME}"After rebooting, edit ~/.ssh/known_hosts on your local machine to
remove the initial entries since the host keys have been reset after
installation.
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' \
> "$KEYS_DIR/ssh/$NEW_HOSTNAME.pub"
ssh root@$NEW_HOSTIP -t 'cat /etc/ssh/ssh_host_rsa_key.pub' \
> "$KEYS_DIR/ssh/$NEW_HOSTNAME-rsa.pub"
nix run nixpkgs#ssh-to-age -- -i "$KEYS_DIR/ssh/$NEW_HOSTNAME.pub" \
| tr --delete '\n' \
> "$KEYS_DIR/age/$NEW_HOSTNAME.txt"
git add $KEYS_DIRAdd the host to //.sops.yaml, then:
direnv reload
grep "$NEW_HOSTNAME" $PRJ_ROOT/.sops.yaml --before-context=10
sops updatekeys secrets/global.secrets.yamlAfter 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.
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/keysI 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…?
Work laptop running NixOS via 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 is a “ghost of the circuit”, a denizen of Kairo, LoBE.
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”.
A towering fiend.
Originally built in 2015, recently revamped.
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 |
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 18i20The 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):
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
}
}
...
}
And for the 18i20 itself:
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
}
}
...
}
Source should be PCM 1
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.
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*.
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
Start the machine with the power adapter unplugged (either boot or wake).
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.
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…
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.