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
|
### 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
|
nix run nixpkgs#home-manager -- switch --flake .#hostname // First time
|
||||||
home-manager -- switch --flake .#hostname // Then
|
home-manager -- switch --flake .#hostname // Then
|
||||||
|
@ -21,7 +27,6 @@ home-manager -- switch --flake .#hostname // Then
|
||||||
|
|
||||||
## Show changements between revisions
|
## Show changements between revisions
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix profile diff-closures --profile /nix/var/nix/profiles/system
|
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
|
## Clean system
|
||||||
|
|
||||||
List all profiles
|
List all profiles
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix profile history --profile /nix/var/nix/profiles/system
|
nix profile history --profile /nix/var/nix/profiles/system
|
||||||
```
|
```
|
||||||
|
|
||||||
Remove all profiles older than 7 days
|
Remove all profiles older than 7 days
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nix profile wipe-history --older-than 7d --profile /nix/var/nix/profiles/system
|
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
|
Clean up all useless store from old profiles
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nix store gc --debug
|
sudo nix store gc --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
Optimize Store
|
Optimize Store
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix-store --optimise
|
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
|
```bash
|
||||||
sudo rm -fr /root/.cache/nix/
|
sudo rm -fr /root/.cache/nix/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## To limit resources use during build
|
## To limit resources use during build
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue