Skip to content

Commit

Permalink
docs: add a few useful commands in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
chenlijun99 committed Apr 14, 2023
1 parent 40e84e6 commit d16b8d6
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,30 @@ $ git clone https://github.com/chenlijun99/dotfiles --recursive

[src/nixos](./src/nixos/) contains my flake-based NixOS configuration.

To build the OS, run:
To build the OS and switch to the new generation, run:

```sh
$ nixos-rebuild switch --flake ./src/nixos#<config name>
```

To get list of available NixOS system generations, run:

```sh
$ nix-env --list-generations -p /nix/var/nix/profiles/system
```

To rollback to the previous generation, run

```sh
$ nixos-rebuild switch --rollback
```

To revert to a specific system generation, run

```sh
$ nix-env --list-generations -p /nix/var/nix/profiles/system
```

To update one of the flake inputs, run:

```sh
Expand Down

0 comments on commit d16b8d6

Please sign in to comment.