-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |