My NixOS and Nix home-manager configurations for my various machines, including a deployment with morph.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Leonora Tindall 2b6b7f5076 tailscale on felonyspork 8 months ago
common tailscale on felonyspork 8 months ago
files Reorganization and readme 2 years ago
hosts tailscale on felonyspork 8 months ago
include Minecraft config with graphs and reverse proxy 9 months ago
ops/home use explicit ssh_config 9 months ago
.gitignore Initial commit for just calembel. 2 years ago
.gitmodules Removed unused nixpkgs checkout 2 years ago
.ignore Use home-manager to build home packages and configs 2 years ago
README.md Import home-manager and packages using channels 9 months ago

README.md

Nora's Configs

The evolution of nora/dotfiles; Nix configs under home-manager deployed with morph.

Deployment Host

On the depoyment host, I use nix channels, and set:

$ nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz
nixpkgs https://nixos.org/channels/nixos-22.11

Layout

These files are "organized" as follows:

  • common/ is the directory where most of the configuration happens. These are the files used in more than one host configuration, now or later.
    • home_manager/ includes all common home-manager configs.
      • fragments/ contains package and configuration sets for specific use cases For example, home_manager/rust.nix includes packages and options related to Rust development.
      • common.nix contains all configurations common across all home-manager deployments. For example, GPG agent configurations and Vim settings.
    • users/ contains basic user definitions.
    • default.nix is the core file defining the default nix configuration for all machines.
    • common.nix contains all the common NixOS definitions that all machines will need.
    • fragments/ contains small functions for configuring particular services or system aspects, like Syncthing
  • files/ contains files used by home-manager to deploy anything not covered by existing home-manager options.
  • hosts/ defines host-specific configurations for NixOS and home-manager.
    • felonyspork/ is the bastion/external server (Lenovo Tiny)
      • configuration.nix is the core NixOS configuration file, copied from the installed system
      • hardware-configuration.nix is the hardware config, imported in configuration.nix.
      • home.nix is the home-manager config specifically for felonyspork.
  • ops/ contains all the information needed to deploy using morph.

The import structure goes as follows:

  • The ops/<network>/network.nix file defining the hosts in a network imports
    • common/default.nix for all-machine defaults, which imports
      • common/common.nix for common setup, including fonts, nixpkgs setup, and locale, which imports
        • common/users/* which sets up usernames, shells, SSH keys, and groups for users.
    • the host's hosts/<host>/configuration.nix file, which configures NixOS on the host and imports
      • appropriate common/fragments/<fragment>.nix files, for specific services or use cases.
      • the hosts's hosts/<host>/hardware-configuration.nix file, which configures partitions and drivers.
    • the host's hosts/<host>/home.nix file, which configures home-manager for that host, by importing
      • common/home_manager/common.nix, which configures home-manager for all machines
      • various common/home_manager/fragments/<fragment>.nix, which configures a specific use case, like graphical programs or Rust development.

Unconfigured

Currently, the primary dependencies are:

  • DNS that sets the crimespoon and felonyspork names
  • Mullvad VPN config on crimespoon, allowing LAN connections

Deployment

Simply run push:

$ ops/home/push

To push to only a single machine, use ops/home/push --on <machine>.