<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Tech @ languidnights - config</title><link href="https://blog.languidnights.com/tech/" rel="alternate"></link><link href="https://blog.languidnights.com/tech/feeds/config.atom.xml" rel="self"></link><id>https://blog.languidnights.com/tech/</id><updated>2022-11-03T00:00:00-04:00</updated><entry><title>KDE Applications under Sway</title><link href="https://blog.languidnights.com/tech/kde-applications-under-sway.html" rel="alternate"></link><published>2022-07-11T00:00:00-04:00</published><updated>2022-07-11T00:00:00-04:00</updated><author><name>Christopher R. Nelson</name></author><id>tag:blog.languidnights.com,2022-07-11:/tech/kde-applications-under-sway.html</id><summary type="html">&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title"&gt;&lt;a class="reference internal" href="#top"&gt;Table of Contents&lt;/a&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="#problem-statement" id="toc-entry-1"&gt;Problem Statement&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#what-doesn-t-work" id="toc-entry-2"&gt;What doesn't work&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#what-does-work" id="toc-entry-3"&gt;What does work&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="problem-statement"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;Problem Statement&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I'm using &lt;a class="reference external" href="https://swaywm.org"&gt;Sway&lt;/a&gt; as my &amp;quot;window manager&amp;quot; in my daily workflow. I happen to
like Wayland and am used to tiling window managers, so it's a good fit.
I also think the &lt;a class="reference external" href="https://kde.org"&gt;KDE&lt;/a&gt; project makes &lt;em&gt;excellent&lt;/em&gt; software …&lt;/p&gt;&lt;/div&gt;</summary><content type="html">&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title"&gt;&lt;a class="reference internal" href="#top"&gt;Table of Contents&lt;/a&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="#problem-statement" id="toc-entry-1"&gt;Problem Statement&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#what-doesn-t-work" id="toc-entry-2"&gt;What doesn't work&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#what-does-work" id="toc-entry-3"&gt;What does work&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="problem-statement"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;Problem Statement&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I'm using &lt;a class="reference external" href="https://swaywm.org"&gt;Sway&lt;/a&gt; as my &amp;quot;window manager&amp;quot; in my daily workflow. I happen to
like Wayland and am used to tiling window managers, so it's a good fit.
I also think the &lt;a class="reference external" href="https://kde.org"&gt;KDE&lt;/a&gt; project makes &lt;em&gt;excellent&lt;/em&gt; software, which I like
using in my day-to-day computing. There, however, is not a
&lt;em&gt;well-documented&lt;/em&gt; way to make qt or KDE applications use their KDE style
outside of KDE itself.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="what-doesn-t-work"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;What doesn't work&lt;/a&gt;&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;qt5ct (or qt6ct). Don't get me wrong, they both do what they
advertise, but they don't really let you use your beautiful
breeze(-dark) theme in non-KDE environments.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://lxqt-project.org"&gt;LXQT&lt;/a&gt;. My favorite desktop environment has its own styling/themeing
support which is not the same as KDE's. It allows you to create quite
beautiful qt setups, but if I want dolphin or okular to follow
breeze(-dark), I'm out of luck. This is what I used for a long time to
work around my lack of KDE style.&lt;/li&gt;
&lt;li&gt;XDG_DESKTOP_ENVIRONMENT=kde. Ooo, now we're getting close! This
&lt;em&gt;technically&lt;/em&gt; does what I asked it to do, but it has unfortunate side
effects. Various things start to break as xdg-desktop-portals get
confused as to which variants they should be using. As I'm using Sway,
this needs to be XDG_DESKTOP_ENVIRONMENT=wlr since the compositor and
portal base is not kwin but rather wlroots.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="what-does-work"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;What does work&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I can not find this referenced anywhere with my meagre ddg-foo, so I'm
setting it here for future wanderers to find. After exhausting what I
could find online, I went back to the qt5ct setup. I wondered, is it
possible to set QT_QPA_PLATFORMTHEME to something else sensible? Yes! It
just so happens you can. I discovered, by trial-and-erroring my way
though it (breeze, Breeze, Fusion, and plasma all fail), that you can
set it to kde, allowing your qt and KDE apps to follow the themeing you
set up in ksytemsettings. Lovely good time!&lt;/p&gt;
&lt;p&gt;While it wasn't my answer, I couldn't have found it without &lt;a class="reference external" href="https://sourceforge.net/projects/qt5ct/"&gt;qt5ct&lt;/a&gt; and
the &lt;a class="reference external" href="https://www.reddit.com/r/kde"&gt;reddit&lt;/a&gt; community's guides.&lt;/p&gt;
&lt;p&gt;Here's hoping someone else can pull out a little less of their hair than
did I. I didn't have enough to start with ;-)&lt;/p&gt;
&lt;/div&gt;
</content><category term="config"></category></entry><entry><title>libvirt lessons</title><link href="https://blog.languidnights.com/tech/libvirt-lessons.html" rel="alternate"></link><published>2022-03-19T00:00:00-04:00</published><updated>2022-11-03T00:00:00-04:00</updated><author><name>Christopher R. Nelson</name></author><id>tag:blog.languidnights.com,2022-03-19:/tech/libvirt-lessons.html</id><summary type="html">&lt;div class="contents topic" id="contents"&gt;
&lt;p class="topic-title"&gt;&lt;a class="reference internal" href="#top"&gt;Contents&lt;/a&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="#background" id="toc-entry-1"&gt;Background&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#automagic-configs" id="toc-entry-2"&gt;Automagic Configs&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="reference internal" href="#networking" id="toc-entry-3"&gt;networking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#qemu-command-line" id="toc-entry-4"&gt;qemu command line&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#storage" id="toc-entry-5"&gt;Storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#video-acceleration" id="toc-entry-6"&gt;Video Acceleration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#freedos-specific" id="toc-entry-7"&gt;FreeDOS Specific&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="background"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#contents"&gt;Background&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;On my powerhouse machine, I use virtual machines to contain experiments
and code I don't trust into little self-contained sandboxes. I also
separate some concerns into their own machines. Here, we'll go over
things I've learned …&lt;/p&gt;&lt;/div&gt;</summary><content type="html">&lt;div class="contents topic" id="contents"&gt;
&lt;p class="topic-title"&gt;&lt;a class="reference internal" href="#top"&gt;Contents&lt;/a&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="#background" id="toc-entry-1"&gt;Background&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#automagic-configs" id="toc-entry-2"&gt;Automagic Configs&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="reference internal" href="#networking" id="toc-entry-3"&gt;networking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#qemu-command-line" id="toc-entry-4"&gt;qemu command line&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#storage" id="toc-entry-5"&gt;Storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#video-acceleration" id="toc-entry-6"&gt;Video Acceleration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#freedos-specific" id="toc-entry-7"&gt;FreeDOS Specific&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="background"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#contents"&gt;Background&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;On my powerhouse machine, I use virtual machines to contain experiments
and code I don't trust into little self-contained sandboxes. I also
separate some concerns into their own machines. Here, we'll go over
things I've learned in the course of my setups.&lt;/p&gt;
&lt;p&gt;First off, I'm using linux, so my base layer is &lt;a class="reference external" href="https://www.qemu.org"&gt;qemu&lt;/a&gt; + &lt;a class="reference external" href="https://www.linux-kvm.org/page/Main_Page"&gt;kvm&lt;/a&gt;. The
perfect tool to manage your virtualization is &lt;a class="reference external" href="https://libvirt.org"&gt;libvirt&lt;/a&gt;. For my graphical
management, I'm using the absolutely amazing &lt;a class="reference external" href="https://virt-manager.org"&gt;virt-manager&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="automagic-configs"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#contents"&gt;Automagic Configs&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There are a few things that, if you use libvirt and virt-manager, you no
longer have to worry about configuring. Advancements is the tooling and
automation have come far since most tutorials.&lt;/p&gt;
&lt;div class="section" id="networking"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="#contents"&gt;networking&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A lot of documentation asks you to create a bridge interface and add it
to your &lt;tt class="docutils literal"&gt;/etc/network/interfaces&lt;/tt&gt; or create a systemd service for it.
This is no longer necessary. Simply right-click your qemu+kvm connection
details, navigate to the &lt;tt class="docutils literal"&gt;Virtual Networks&lt;/tt&gt; tab, and click the &lt;tt class="docutils literal"&gt;run
button&lt;/tt&gt; at the bottom. Boom! Network setup. For the individual users,
this is all you'll have cause to user; you're not an enterprise
sysadmin, you don't need to learn networking managements details for a
simple project.&lt;/p&gt;
&lt;img alt="illustration of network setup" src="images/libvirt_network.png" style="width: 960px; height: 540px;" /&gt;
&lt;/div&gt;
&lt;div class="section" id="qemu-command-line"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="#contents"&gt;qemu command line&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I don't know about you, but I never could type the qemu command line
properly, so I ended up writing a script and triple checking where I'd
modified an example to do the setup, and still get it wrong one time out
of three. This is messy and error-prone, and kind of silly to still be
doing manually. Luckily, if you use virt-manager, it'll write out a
pretty standard startup and connection string for you, as well as the
libvirt xml to match it. I'm a software engineer by training, not an
enterprise sysadmin, I'm really grateful that I don't have to anymore.&lt;/p&gt;
&lt;img alt="example of autogenerated xml" src="images/libvirt_xml.png" style="width: 960px; height: 540px;" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="storage"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#contents"&gt;Storage&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Almost any virtual machine needs a backing store. The default way for
virt-manager is to use a qcow2 file in &lt;tt class="docutils literal"&gt;/var/lib/libvirt/images/&lt;/tt&gt;. I
am already using &lt;a class="reference external" href="https://sourceware.org/lvm2/"&gt;lvm&lt;/a&gt; (&lt;a class="reference external" href="https://www.debian.org/releases/testing/amd64/ch06s03.en.html#di-partition"&gt;see here&lt;/a&gt;)
for managing my host system, so may well use it for virtual systems too.
This is a fairly easy setup if you've already set up your volume group.
In the 'add storage' dialog, the left pane in your storage pools. Click
the add button on the lower left. Then, under the &lt;tt class="docutils literal"&gt;Type&lt;/tt&gt; dropdown,
select &lt;tt class="docutils literal"&gt;logical: LVM Volume Group&lt;/tt&gt;. Your volume groups should be
populated in the &lt;tt class="docutils literal"&gt;Volgroup Name:&lt;/tt&gt; dropdown. Select the proper volume
group, and you can then create a new logical volume using default
settings (no need to call &lt;tt class="docutils literal"&gt;lvcreate &lt;span class="pre"&gt;--size&lt;/span&gt; xx &lt;span class="pre"&gt;--name&lt;/span&gt; volume_name
volume_group_name&lt;/tt&gt; yourself).&lt;/p&gt;
&lt;img alt="storage pool configuration illustration" src="images/libvirt_storage_pool.png" style="width: 758px; height: 524px;" /&gt;
&lt;/div&gt;
&lt;div class="section" id="video-acceleration"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#contents"&gt;Video Acceleration&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In the before times, to get gpu acceleration in a virtual machine you
had to pass through an unused phsycial graphics card. For Windows VMs,
you probably still have to. These days, if your host and guest graphics
stack uses &lt;a class="reference external" href="https://mesa3d.org/"&gt;Mesa&lt;/a&gt;, you have the ability to use the hosts gpu acceleration
on the guest's window. I originally had to build various bits myself,
but after I came across &lt;a class="reference external" href="https://ryan.himmelwright.net/post/virtio-3d-vms/"&gt;Ryan Himmelwright's&lt;/a&gt; blog I discovered the
stuff was already built in. Just set the graphics type to &lt;tt class="docutils literal"&gt;virtio&lt;/tt&gt;,
tick the &lt;tt class="docutils literal"&gt;3d Acceleration&lt;/tt&gt; box, and set your &lt;tt class="docutils literal"&gt;Display&lt;/tt&gt; to Spice and
tick &lt;tt class="docutils literal"&gt;OpenGL&lt;/tt&gt;. Yes, these two settings will complain until they match.
That's fine, just match them :-)&lt;/p&gt;
&lt;img alt="Spice server configuration illustration" src="images/libvirt_spice_server.png" style="width: 960px; height: 540px;" /&gt;
&lt;/div&gt;
&lt;div class="section" id="freedos-specific"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#contents"&gt;FreeDOS Specific&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I installed a working &lt;a class="reference external" href="https://freedos.org/"&gt;FreeDOS&lt;/a&gt; install. Everything worked out of the
box, except for the audio device. I manually changed the &lt;tt class="docutils literal"&gt;audio&lt;/tt&gt;
setting to sb16 by manually editing the xml snippet to &lt;tt class="docutils literal"&gt;sb16&lt;/tt&gt;.&lt;/p&gt;
&lt;img alt="FreeDOS sound setting illustration" src="images/libvirt_freedos_audio.png" style="width: 645px; height: 550px;" /&gt;
&lt;p&gt;I then had to add a soundblaster driver in FreeDOS itself. I got the
Win3.11.zip archive from this &lt;a class="reference external" href="https://volitank.com/linux/"&gt;URL&lt;/a&gt; from
this &lt;a class="reference external" href="https://www.youtube.com/watch?v=XEBMWiLBKuI"&gt;YouTube video&lt;/a&gt;
(warning, possible audio issues). I pulled the soundblaster directory
and passed it through to FreeDOS, then ran the executable and it set up
autoexec.bat and everything else for me. (Don't be surprised if that
link goes away, the video author owns it, and it appears to be a
personal website). The &lt;a class="reference external" href="https://oemdrivers.com/sound-sb16"&gt;oemdrivers&lt;/a&gt;
site may be a good backup. Now I can hear that glorious (?) crunchy
sound of Doomguy shooting his pistol.&lt;/p&gt;
&lt;/div&gt;
</content><category term="config"></category></entry><entry><title>Home Directory in Git</title><link href="https://blog.languidnights.com/tech/home-directory-in-git.html" rel="alternate"></link><published>2022-03-18T00:00:00-04:00</published><updated>2022-11-03T00:00:00-04:00</updated><author><name>Christopher R. Nelson</name></author><id>tag:blog.languidnights.com,2022-03-18:/tech/home-directory-in-git.html</id><summary type="html">&lt;p&gt;Keeping my $HOME in git.&lt;/p&gt;
&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title"&gt;&lt;a class="reference internal" href="#top"&gt;Table of Contents&lt;/a&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="#living-in-git-or-why-are-we-here" id="toc-entry-1"&gt;Living in Git, or Why are we Here?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#other-implementations" id="toc-entry-2"&gt;Other Implementations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#conceptual-design" id="toc-entry-3"&gt;Conceptual Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#implementation" id="toc-entry-4"&gt;Implementation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#i-want-it" id="toc-entry-5"&gt;I want it!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="living-in-git-or-why-are-we-here"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;Living in Git, or Why are we Here?&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Over time I've accumulated a massive amount of built-up configurations
and other cruft in my home directory, and …&lt;/p&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Keeping my $HOME in git.&lt;/p&gt;
&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title"&gt;&lt;a class="reference internal" href="#top"&gt;Table of Contents&lt;/a&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="#living-in-git-or-why-are-we-here" id="toc-entry-1"&gt;Living in Git, or Why are we Here?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#other-implementations" id="toc-entry-2"&gt;Other Implementations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#conceptual-design" id="toc-entry-3"&gt;Conceptual Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#implementation" id="toc-entry-4"&gt;Implementation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="#i-want-it" id="toc-entry-5"&gt;I want it!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="living-in-git-or-why-are-we-here"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;Living in Git, or Why are we Here?&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Over time I've accumulated a massive amount of built-up configurations
and other cruft in my home directory, and whenever I need to bring a new
computer online I have to copy my desktop configuration to it, like a
game of software config telephone. (this happens to me more often that
you'd think, as I have a number of &lt;a class="reference external" href="https://www.raspberrypi.org"&gt;Raspberry Pi&lt;/a&gt; boards I use as
desktops until I have a need for it in an embedded solution). I figured
there had to be a better way, using the tools I picked up as a
developer. Turns out there is :-)&lt;/p&gt;
&lt;p&gt;I remembered &lt;em&gt;A Long Time Ago™&lt;/em&gt; reading about &lt;a class="reference external" href="https://etckeeper.branchable.com/"&gt;Joey Hess&lt;/a&gt; writing
etckeeper to keep the configuration files in /etc/ under, ahem, control.
I also remember vaguely seeing similar software for home directories,
but those software projects are lost to years of imperfect memory, and
so I couldn't find them. Hence, my writing a new one.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="other-implementations"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;Other Implementations&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There are probably many, many, &lt;em&gt;many&lt;/em&gt; implementations to keeping your
home directory in git. Most of them would probably even work for my
personal setup, but &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Not_invented_here"&gt;NIH&lt;/a&gt; and all. So I wrote my own! I'm actually kind
of proud of it, but if the gods are kind it stays pretty much the way it
is for the foreseeable future, as I've settled somewhat in my 'config'
churn and am running &lt;a class="reference external" href="https://www.debian.org"&gt;Debian Stable&lt;/a&gt; anyway so my software shouldn't be
changing its config syntax weekly.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="conceptual-design"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;Conceptual Design&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;My requirements are the following:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;the configuration files should be in version control&lt;/li&gt;
&lt;li&gt;the configuration files must be able to be kept separate from the live
config files&lt;/li&gt;
&lt;li&gt;the script must be able to be executed on any system I might call home
(this means POSIX compliant shells, such as &lt;a class="reference external" href="http://gondor.apana.org.au/~herbert/dash/"&gt;DASH&lt;/a&gt;, or &lt;a class="reference external" href="https://www.perl.org/"&gt;perl&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;ideally, allows symlinking so as to make changes easily pushed
upstream&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="implementation"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;Implementation&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To achieve this, I went with &lt;a class="reference external" href="https://git-scm.com/about"&gt;git&lt;/a&gt; for version control. This allows me
to utilize the git setup framework I already had installed for my
software projects (it's &lt;a class="reference external" href="https://projects.languidnights.com/cgit"&gt;here&lt;/a&gt; if you're interested). It's also quite
well documented and recipes exist for almost every scenario on either
&lt;a class="reference external" href="https://serverfault.com/questions"&gt;Server Fault&lt;/a&gt; or &lt;a class="reference external" href="https://www.reddit.com/r/git/"&gt;reddit&lt;/a&gt;. I initialized a new git repository on my
server for this to live in, calling it l-homedir after a bit of
self-serving names :-)&lt;/p&gt;
&lt;p&gt;In my shiny new git repo copy, I moved (as in &lt;tt class="docutils literal"&gt;mv&lt;/tt&gt;) the interesting
and non-private configurations into it. I maintained the directory
structure you would find in my home directory (for example, my
&lt;tt class="docutils literal"&gt;.zshrc&lt;/tt&gt; file is in &lt;tt class="docutils literal"&gt;$REPO_ROOT&lt;/tt&gt; and my &lt;tt class="docutils literal"&gt;nvim&lt;/tt&gt; config lives in
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;$REPO_ROOT/.config/nvim&lt;/span&gt;&lt;/tt&gt;). This allows me to separate the files I
care about from those that I do not care if get lost, or those that
contain private information (ssh private keys and such).&lt;/p&gt;
&lt;p&gt;To accomplish the copying/linking files (linking in this case) I wrote a
mildly complicated shell file, and a corresponding config file.
&lt;tt class="docutils literal"&gt;linked_files&lt;/tt&gt; contains a list of files I want to maintain here---in
case something accidentally ends up in the repo. &lt;tt class="docutils literal"&gt;make_links&lt;/tt&gt; is the
shell script. The script follows this basic flow&lt;/p&gt;
&lt;ol class="arabic simple" id="loop-top"&gt;
&lt;li&gt;iterate over each line in &lt;tt class="docutils literal"&gt;linked_files&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;if it is blank or starts with a hash (#) ignore it&lt;/li&gt;
&lt;li&gt;check if the file already exists?&lt;/li&gt;
&lt;li&gt;if the file already exists, is it running in destructive mode?&lt;/li&gt;
&lt;li&gt;if in destructive mode, &lt;tt class="docutils literal"&gt;rm&lt;/tt&gt; the original file, otherwise skip it&lt;/li&gt;
&lt;li&gt;if skipped, return to &lt;a class="reference internal" href="#loop-top"&gt;Loop Top&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;ln &lt;span class="pre"&gt;-s&lt;/span&gt;&lt;/tt&gt; the file in the repository to the home directory&lt;/li&gt;
&lt;li&gt;Return to &lt;a class="reference internal" href="#loop-top"&gt;Loop Top&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I wrote a README and brought in a license file to top it off, and I have
a shiny new home-in-git solution :-D&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="i-want-it"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="#table-of-contents"&gt;I want it!&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Assuming you're not trolling me, get it &lt;a class="reference external" href="git://languidnights.com/l-homedir.git"&gt;right here&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</content><category term="config"></category></entry></feed>