Skip to content

Commit

Permalink
docs: tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Mar 19, 2024
1 parent 6ad031e commit 8ba07e1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
22 changes: 1 addition & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
# Nix configs

## NixOS

```sh
nixos-rebuild switch --flake .#<hostname>
```

## Home Manager

Bootstrap:

```sh
nix run nixpkgs#home-manager -- switch --flake .
```

Normal:

```sh
home-manager switch --flake .
```
# dotfiles [![CI](https://github.com/DanNixon/dotfiles/actions/workflows/ci.yml/badge.svg)](https://github.com/DanNixon/dotfiles/actions/workflows/ci.yml)
26 changes: 26 additions & 0 deletions cheatsheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Cheat Sheet

## NixOS

- Update now: `nixos-rebuild switch --flake .`
- Update on boot: `nixos-rebuild boot --flake .`

## Home Manager

- Bootstrap: `nix run nixpkgs#home-manager -- switch --flake .`
- Update: `home-manager switch --flake .`

## Managing NixOS generations

- List: `nix-env --profile /nix/var/nix/profiles/system --list-generations`
- Remove specific: `nix-env --profile /nix/var/nix/profiles/system --delete-generations N ...`

## Managing Home Manager generations

- List: `home-manager generations`
- Remove specific: `home-manager remove-generations N ...`
- Remove old: `home-manager expire-generations "-7days"`

## Store

- Garbage collect: `nix store gc`

0 comments on commit 8ba07e1

Please sign in to comment.