Skip to content

McDamon/dotfiles

Repository files navigation

dotfiles

Andrew McMahon's NixOS dotfiles built with nix

amcmahon NixOS configurations

NixOS/home-manager config files. Requires Nix flakes.

Shamelessly inspired/ripped-off from misterio77 and archer-65

Structure

  • flake.nix: Entrypoint for hosts and home configurations. Also exposes devshells for boostrapping (nix develop or nix-shell).
  • hosts: NixOS Configurations
    • common: Shared configurations consumed by the machine-specific ones.
      • common: Configurations that are applied to all machines.
      • optional: Opt-in configurations any machines can use.
    • razorback: Asus TUF A17 2023 Laptop
    • rocinante: AMD 9950X3D / RTX 4090 Workstation
  • home: Home-manager configuration
  • modules: Modules (with options).
  • overlays: Patches and version overrides for some packages. Accessible via nix build.
  • pkgs: Custom packages. Also accessible via nix build.

How to bootstrap

Using razorback as an example:

  1. Add following to /etc/nixos/configuration.nix:
networking.hostName = "razorback";

nix.settings.experimental-features = [ "nix-command" "flakes" ];

environment.systemPackages = with pkgs; [
  vim
  wget
  git
];

services.openssh.enable = true;
  1. Run sudo nixos-rebuild switch

  2. Then:

mkdir -p Sources
cd Sources
git clone git@github.com:McDamon/dotfiles.git
cd dotfiles
nix develop
  1. Clone the generated hardware configuration (we will modify this later):
cp /etc/nixos/hardware-configuration.nix ~/Sources/dotfiles/hosts/razorback/
  1. Add the following lines to hardware-configuration.nix:
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
  1. Rebuild
sudo nixos-rebuild switch --flake .#razorback
home-manager switch --flake .#amcmahon@razorback
  1. Reboot, and enable Secure Boot in BIOS

  2. Enable secure boot using direction from https://github.com/nix-community/lanzaboote, merging in lanzaboote from the existing git hardware-configuration.nix

  3. Enable TPM boot:

sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+7 /dev/nvme1n1p2
  1. Rebuild and Reboot

About

Andrew McMahon's NixOS dotfiles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors