Skip to content

varyag00/nixos_config

Repository files navigation

NixOS Configuration

My personal flake-based NixOS configuration, as well as some docs and illustrative examples.

Structure

  • nixos_flake/: my current nixos configuration and dotfiles flake.
  • examples/: contains some helpful examples to help illustrate the nix the different components being used here.
  • docs/: contains some personal docs for using this repo.

Info

Usage

Ensure that this repo is cloned into $HOME.

Open .envrc and ensure the proper options are set. $nixos_profile must be set to one of the available profiles for task to run.

Use the taskfile targets to get started. Note that on first run, task will not be installed so use nix-shell -p go-task to temporarily install it.

task install

Afterwards, use task rebuild to reload configuration.

Why NixOS?

  1. Stability: NixOS never breaks in day-to-day operation, and when it does break while applying system changes, by design you always have an easily-recoverable backup.
  2. Reproducibility: NixOS supports specifying your entire system in fully declarative and reproducible flakes. It's a lockfile for your entire system.
  3. Features: NixOS is extremely feature-rich, and has the largest package index for both stable and fresh packages, nixpkgs.

Why not NixOS?

  1. Documentation: Docs vary greatly in quality, freshness, and availability; it's also hard to know where to look for documentation for a specific topic.
  2. Error messages: By default, NixOS has awful error messages. This problem can be remedied using tools like nh (nix-helper).
  3. The elephant in the room, Nix language: The Nix DSL is very well suited to its intended purpose of creating NixOS derivations. However, the fact that Nix lang is a declarative, functional, domain-specific language with a difficult learning curve is a big turn-off for some people. This is not helped by the fact that there are many different patterns to accomplish the same end goal, with vastly different tradeoffs that are not immediately clear, and with little standardization by the community, and the situation becomes confusing.
  • e.g. user package management: environment.systemPackages in configuration.nix vs. home-manager vs configuration.nix AND home-manager vs nix-env vs ...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published