Skip to content

yozhgoor/nixos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS configuration

This repository keep track of my personal NixOS configuration.

Structure

flowchart TD
    subgraph configuration
        nostromo
        sanctuary
        default
    end
    subgraph modules
        alacritty
        bash
        git
        home-manager
        markdown
        neovim
        rust
        sway
    end

flake.nix-->nostromo
flake.nix-->sanctuary

nostromo-->home-manager
nostromo-->default

sanctuary-->home-manager
sanctuary-->default

sanctuary-->bash
sanctuary-->markdown
sanctuary-->rust

default-->alacritty
default-->git
default-->neovim
default-->sway
Loading

This setup use Flakes so the "entrypoint" is flake.nix.

Configuration

The configuration directory contains configuration specific to the hosts.

Modules

The modules directory is related to the programs or services optionally imported.

Usage

Rebuild the system from the local repository:

sudo nixos-rebuild switch --flake <path_to_repo>#hostname

The available hostnames available at the moment are:

  • sanctuary (x86_64-linux)
  • nostromo (aarch64-linux)

Example: sudo nixos-rebuild switch --flake .config/nixos#sanctuary

Note that <path_to_repo> can be the path to the local repository but also the remote repository:

sudo nixos-rebuild switch --flake github:owner/repo#hostname

Example: sudo nixos-rebuild switch --flake github:yozhgoor/nixos#nostromo

Upgrade

You can upgrade NixOS to the latest version by running:

nixos-rebuild switch --upgrade --flake <path_to_repo>#hostname

Note that auto-upgrade is enabled in configuration/default.nix.

Clean up

To remove old, unreferenced packages:

nix-collect-garbage

The following command deletes old roots, removing the ability to roll back to them:

nix-collect-garbage -d
sudo nix-collect-garbage -d

To delete all historical versions you can use

sudo nix profile wipe-history

Optimize

You can manually optimize the store using:

nix-store --optimise

About

Personal NixOS configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages