from Hawai'ian meaning "group of houses comprising a home" literally "plural house"
This is my NixOS home.
NixOS with flakes
-
get a NixOS live system, e.g., from the NixOS download page, or by building one of the ISO images from this repo's
flake.nix
:nix build .#nixosConfigurations.minimalIso.config.system.build.isoImage
-
boot into the NixOS live system
-
connect to your WiFi network:
nmcli device wifi connect <SSID> --ask
-
-
install NixOS
a. directly from the remote:
nixos-install --flake github:bluesquall/kauhale/main/nixos#encom
b. clone this repo, modify accordingly, and install
-
git clone https://github.com/bluesquall/kauhale.git
-
modify to suit your needs
-
nixos-install --flake .#encom
ornixos-install --system ./os/encom.nix
-
-
reboot
Home Manager with flakes
With Home Manager, you can still declare your user environment on another Linux distribution besides NixOS (e.g., Debian, Ubuntu, Arch) and even on Mac OS X.
-
install
nix
1sh <(curl -L https://nixos.org/nix/install) --daemon
-
install
home-manager
2nix run home-manager/master -- init --switch
-
switch to your flake[^2]:
home-manager switch --flake ~/src/kauhale#squall
or, if you have different home configurations for different hosts:
home-manager switch --flake ~/src/kauhale#$(whoami)@$(hostname)
After using Arch Linux for many years, I'm trying out NixOS. I've written a system initialization script to automate setup using a NixOS live disk. It is inspired by, and heavily patterned after, a post about setting up darling erasure on an encrypted btrfs volume. (I have not yet started using darling erasure -- I'm still getting used to NixOS first.)
-
test-drive [homies]
-
review this post on setting up a dev environment using Nix and decide what to apply to my approach
-
package [LCM] using flakes
It seems like most NixOS users manage their dotfiles with [home-manager], but [homies] seems like an attractive alternative. It also looks like you may be able to set up something using flakes.
My login shell is zsh
so that anything expecting POSIX compliance will get
it, but my keyboard shortcut for the terminal uses fish
so that's what I
have for most interactive shells on the machine. We will see how this fares.
Kudos to Matt Hart for suggesting this approach in a post. I
haven't needed fenv
yet, but that may a difference between using NixOS and
using nix
on top of a different OS.
On my Arch installations, I've started to use kitty
, and I may continue to
use it on my NixOS installations, but to keep the base derivation minimal I
rely first on uxterm
with a few customizations in ~/.Xresources
to keep
it from blinding me with a white background.
Here's the relevant line in ~/.config/i3/config
:
bindsym $mod+Return exec "SHELL=$HOME/.nix-profile/bin/fish uxterm"
Started with vim
many years ago so that I'd be learning something I could
count on having on robots and other embedded machines. Still plenty to learn
to be more effective and efficient.
Using nvim
on the NixOS installations -- need to figure out how to alias
it in the nix configs.
Use one! pass
works for me.
If you need packages from nixos-unstable
for your installation, and you
would rather not have to run nix-channel --add
& nix-channel --update
to make out-of-band changes to the system before nixos-rebuild switch
, our
friend at functor.tokyo shows us how to reference it directly
in configuration.nix
and avoid relying on external state.
Footnotes
-
See the NixOS download page. ↩
-
See the Home Manager chapter on flakes. I used the installation command for the unstable version because it worked the first time, and does not depend on the flake in this repository working correctly. You can always remove or overwrite the basic configuration it installs (in
$XDG_CONFIG_HOME/home-manager
by default) or redirect the init to a temporary folder:nix run home-manager/master -- init /tmp/hm
. ↩