Skip to content

Commit 96155aa

Browse files
committed
introduce nix
1 parent 8161933 commit 96155aa

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

books/linux-workstation.org

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,22 @@ directories, the root filesystem is immutable, so the process of
101101
installing packages might be a bit different than what you are familar
102102
with.
103103

104-
If you want to install something that isn't in the base image,
105-
you have a few different options:
104+
If you want to install something that isn't in the base image, you
105+
have a few different options:
106+
107+
* [[https://nixos.org/][Nix]] is a declarative package manager that installs packages into
108+
=/nix/store= without touching the root filesystem. Using [[https://github.com/nix-community/home-manager][Home
109+
Manager]], you can manage your entire user environment (packages and
110+
dotfiles) reproducibly. This is my preferred method for installing
111+
user packages, as it provides rollback capabilities and works
112+
identically across any Linux distribution.
106113

107114
* Podman or Docker containers (including toolbox and distrobox).
108115
Since containers use their own image, they are separate from the
109116
root image, and can be freely created and destroyed separately (no
110-
reboot).
111-
117+
reboot). Distrobox is still useful for running applications that
118+
need a traditional mutable Linux environment.
119+
112120
* Flatpak is a type of application container that includes all of its
113121
dependencies, and it is sandboxed/isolated from the host system,
114122
therefore they can be installed/managed separately from the base
@@ -121,11 +129,13 @@ you have a few different options:
121129
machine must boot the combined layers as one image, so therefore
122130
you must reboot the machine each time you install new packages this
123131
way.
124-
125-
For almost everything, I use Podman containers via [[https://docs.fedoraproject.org/en-US/fedora-silverblue/toolbox/][toolbox]] and/or
126-
[[https://distrobox.it/][distrobox]] and these can even include graphical applications. Flatpak
127-
doesn't appeal to me. For a few things that cannot be installed in a
128-
container, I have [[/linux-workstation/layering-packages][added them as an rpm-ostree layer]].
132+
133+
For my user environment, I use [[https://github.com/EnigmaCurry/sway-home][sway-home]] with Nix Home Manager. This
134+
provides a declarative configuration for all my dotfiles and user
135+
packages that can be version controlled and easily reproduced on any
136+
machine. I use Flatpak for a few graphical desktop apps only. For a
137+
few system-level packages that cannot be installed via Nix, I have
138+
[[/linux-workstation/layering-packages][added them as an rpm-ostree layer]].
129139

130140
** Requirements
131141
:PROPERTIES:
@@ -767,6 +777,12 @@ Restart firefox.
767777
:EXPORT_HUGO_SLUG: distrobox
768778
:END:
769779

780+
#+attr_shortcode: :style tip
781+
#+begin_notice
782+
If you prefer to manage your user environment entirely with Nix and
783+
Home Manager, you can skip this section.
784+
#+end_notice
785+
770786
[[https://docs.fedoraproject.org/en-US/fedora-silverblue/toolbox/][Distrobox]] (and/or [[https://containertoolbx.org/][Toolbx]]) is an integral part of Fedora Atomic, being
771787
one of the main methods of installing software, it lets you run your
772788
applications inside of [[https://podman.io][Podman]] containers. Distrobox can actually be

0 commit comments

Comments
 (0)