Skip to content

ryhkml/nix-home-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

220 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Home Manager

My home-manager config for Fedora. One home.nix file, a pile of Neovim Lua, and the usual overengineered dotfiles.

Installation

Note

These steps are for a standard (mutable) Linux distribution with single-user Nix. On immutable distros Silverblue, use the Determinate Systems installer instead.

  1. Install Nix (single-user, no daemon):

    sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --no-daemon
    . /home/$USER/.nix-profile/etc/profile.d/nix.sh

    Nix version:

    nix (Nix) 2.31.3

    More info at nixos.org/download

  2. Add channels:

    nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
    nix-channel --add https://github.com/nix-community/nixGL/archive/main.tar.gz nixgl
    nix-channel --update

    The home-manager channel tracks unstable/master, so packages follow whatever is current on search.nixos.org/packages. The nixgl channel is for GPU wrappers on non-NixOS systems (nixGL repo).

  3. Install Home Manager and create the first generation:

    nix-shell '<home-manager>' -A install
    echo ". /home/$USER/.nix-profile/etc/profile.d/nix.sh" | tee -a ~/.bashrc > /dev/null
    source ~/.bashrc
  4. Verify:

    cat ~/.config/home-manager/home.nix

Next step

See the Home Manager manual for how to use the home-manager command.

Packages

CLIs, language servers, formatters, and a few plugins.

A

  1. act - Run GitHub Actions locally
  2. air - Live reload for Go apps
  3. alacritty - A cross-platform OpenGL terminal emulator
  4. asciiquarium-transparent - Aquarium/sea animation in ASCII art
  5. asm-lsp - LSP for Assembly
  6. asmfmt - Formatter for Assembly
  7. astyle - Formatter only for Java

B

  1. bash-language-server - LSP for Bash
  2. bat - Alternative to cat
  3. beautysh - Formatter for Shell
  4. binsider - Analyzer of executables using a terminal user interface
  5. black - Formatter for Python
  6. bun - Javascript runtime, bundler, test runner, and package manager
  7. btop - A monitor of resources

C

  1. cmus - Console music player for Unix-like operating systems

D

  1. direnv - Unclutter your .profile
  2. docker-language-server - LSP for Docker Compose
  3. dockerfile-language-server - LSP for Dockerfile
  4. duf - Disk usage or free utility. A better df alternative

E

  1. editorconfig - Enforces consistent coding styles across editors and IDEs
  2. exiftool - Meta information reader or writer

F

  1. fastfetch - Neofetch like system information tool
  2. fd - Alternative to find
  3. file - Shows the type of files
  4. firebase - Firebase CLI
  5. fish - User friendly command line shell
  6. fishPlugins.autopair - Auto complete matching pairs in the fish command line
  7. fzf - Command line fuzzy finder

G

  1. gcloud - Google Cloud CLI
  2. go - Golang!
  3. go-migrate - Database migrations. CLI and Golang library
  4. gopls - LSP for Go
  5. govulncheck - Go vulnerability checker
  6. gping - Ping, but with a graph

H

  1. hclfmt - Formatter for HCL
  2. hey - HTTP load generator, ApacheBench (ab) replacement
  3. htmx-lsp - LSP for HTMX
  4. huggingface-hub - CLI and Python library for HuggingFace Hub
  5. hyperfine - Command line benchmarking tool

I

  1. id3v2 - Command line editor for id3v2 tags
  2. isort - Formatter for Python imports

J

  1. jdt-language-server - LSP for Java
  2. jq - Lightweight and flexible command line JSON processor

K

  1. k6 - Modern load testing tool, using Go and JavaScript

L

  1. latexmk - TeX Live environment
  2. lazydocker - The lazier way to manage everything docker
  3. lazygit - Terminal UI for git commands
  4. lazysql - A cross-platform TUI database management tool written in Go
  5. lua - Lualang!
  6. lua-language-server - LSP for Lua

M

  1. minify - Web formats minifier

N

  1. neovim - Hyperextensible Vim-based text editor
  2. nil - Yet another LSP for Nix
  3. nixgl - A wrapper tool for Nix OpenGL application
  4. nix-prefetch-git - Script used to obtain source hashes for fetchgit
  5. nixfmt-rfc-style - Formatter for Nix
  6. nodejs - Event-driven I/O framework for the V8 Javascript engine
  7. nodePackages.prettier - Formatter only for HTML, CSS, JS, TS, and JSON

O

  1. onefetch - Git repository summary on your terminal

P

  1. packer - Tool for creating identical machine images
  2. pnpm - Fast, disk space efficient package manager
  3. podman-compose - Implementation of docker-compose with podman backend
  4. pyright - LSP for Python

R

  1. R - Free software environment for statistical computing and graphics
  2. ripgrep - Searcher with the raw speed of grep
  3. rlwrap - A readline wrapper
  4. rtk - Reduces LLM token consumption by 60-90% on common dev commands
  5. rustup - Rust toolchain installer
  6. rust-analyzer - Modular compiler frontend for the Rust language
  7. rustfmt - Formatter for Rust

S

  1. shellcheck - Shell script analysis tool
  2. stylua - Formatter for Lua

T

  1. tailwindcss-language-server - LSP for Tailwind CSS
  2. taplo - TOML toolkit written in Rust
  3. terraform - Tool for building, changing, and versioning infrastructure
  4. terraform-ls - LSP for Terraform
  5. tesseract - OCR engine
  6. tex-fmt - Formatter for TeX
  7. texlab - LSP for TeX
  8. tokei - Count your code quickly
  9. tree-sitter - Parser generator tool and an incremental parsing library
  10. typescript - Javascript with syntax for types
  11. typescript-language-server - LSP for Typescript using tsserver

U

  1. ueberzugpp - Display images in terminal emulators
  2. unar - Archive unpacker program
  3. uv - Fast Python package manager

V

  1. vscode-langservers-extracted - LSP extracted from Vscode only for HTML/CSS/JSON/ESLint

Y

  1. yamlfmt - Formatter for YAML
  2. yaml-language-server - LSP for YAML
  3. yt-dlp - Command line tool to download videos from Youtube and other sites

Z

  1. zellij - A terminal workspace
  2. zig - Ziglang!
  3. zls - LSP for Zig
  4. zoxide - Fast cd that learns your habits

Uninstalling Nix and Home Manager (single-user)

Delete everything nix-related:

nix-collect-garbage
nix-collect-garbage -d
rm -rf ~/.cache/nix \
    ~/.config/nix ~/.config/home-manager \
    ~/.local/share/nix ~/.local/share/home-manager \
    ~/.local/state/nix ~/.local/state/home-manager \
    ~/.nix-channels ~/.nix-defexpr ~/.nix-profile
sudo rm -rf /nix

Then remove these lines from .bashrc and .bash_profile:

# .bash_profile
if [ -e /home/user/.nix-profile/etc/profile.d/nix.sh ]; then . /home/user/.nix-profile/etc/profile.d/nix.sh; fi
# .bashrc
. "$HOME"/.nix-profile/etc/profile.d/nix.sh

Screenshot

fastfetch

fastfetch

btop

btop

nvim

neovim

zellij

zellij

About

An alternative approach to replacing dotfiles

Topics

Resources

License

Stars

Watchers

Forks

Contributors