Skip to content

bluesquall/kauhale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kauhale

from Hawai'ian meaning "group of houses comprising a home" literally "plural house"

This is my NixOS home.

getting started

NixOS with flakes

  1. 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

  2. boot into the NixOS live system

    • connect to your WiFi network:

      nmcli device wifi connect <SSID> --ask

  3. 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 or nixos-install --system ./os/encom.nix

  4. 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.

  1. install nix1

    sh <(curl -L https://nixos.org/nix/install) --daemon

  2. install home-manager2

    nix run home-manager/master -- init --switch

  3. 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)

ramblin'

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.)

to-do

  • 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

environment

dotfiles

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.

shell

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.

terminal emulators

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"

editor

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.

password manager

Use one! pass works for me.

unstable channel

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

  1. See the NixOS download page.

  2. 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.