README: Add experimental features for home-manager install
All checks were successful
check / check (push) Successful in 35s
All checks were successful
check / check (push) Successful in 35s
This commit is contained in:
parent
791ebc12b7
commit
8c66002774
1 changed files with 13 additions and 3 deletions
16
README.md
16
README.md
|
@ -14,6 +14,12 @@ nix flake update --extra-experimental-features "nix-command flakes"
|
|||
|
||||
### Home manager on standalone Linux
|
||||
|
||||
Edit /etc/nix/nix.conf
|
||||
|
||||
```
|
||||
experimental-features = nix-command flakes
|
||||
```
|
||||
|
||||
```
|
||||
nix run nixpkgs#home-manager -- switch --flake .#hostname // First time
|
||||
home-manager -- switch --flake .#hostname // Then
|
||||
|
@ -21,7 +27,6 @@ home-manager -- switch --flake .#hostname // Then
|
|||
|
||||
## Show changements between revisions
|
||||
|
||||
|
||||
```bash
|
||||
nix profile diff-closures --profile /nix/var/nix/profiles/system
|
||||
```
|
||||
|
@ -33,11 +38,13 @@ nix store diff-closures /nix/var/nix/profiles/system-rev1-link /nix/var/nix/prof
|
|||
## Clean system
|
||||
|
||||
List all profiles
|
||||
|
||||
```bash
|
||||
nix profile history --profile /nix/var/nix/profiles/system
|
||||
```
|
||||
|
||||
Remove all profiles older than 7 days
|
||||
|
||||
```bash
|
||||
sudo nix profile wipe-history --older-than 7d --profile /nix/var/nix/profiles/system
|
||||
```
|
||||
|
@ -47,21 +54,24 @@ nix profile wipe-history --older-than 7d --profile ~/.local/state/nix/profiles/h
|
|||
```
|
||||
|
||||
Clean up all useless store from old profiles
|
||||
|
||||
```bash
|
||||
sudo nix store gc --debug
|
||||
```
|
||||
|
||||
Optimize Store
|
||||
|
||||
```bash
|
||||
nix-store --optimise
|
||||
```
|
||||
|
||||
error: cached failure of attribute 'nixosConfigurations.perso-desktop.config.system.build.toplevel'
|
||||
error: cached failure of attribute
|
||||
'nixosConfigurations.perso-desktop.config.system.build.toplevel'
|
||||
|
||||
```bash
|
||||
sudo rm -fr /root/.cache/nix/
|
||||
```
|
||||
|
||||
|
||||
## To limit resources use during build
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue