No description
Find a file
Florian RICHER f640cd4ca1
All checks were successful
check / check (push) Successful in 30s
hosts(perso-desktop): Remove waydroid and distrobox
I not use this for now
2025-02-04 23:09:21 +01:00
.gitea/workflows Add -y flag in apt install 2024-05-24 21:24:52 +02:00
.vscode Add vscode autocomplete for nix (nixd) 2024-04-28 20:07:42 +02:00
hosts hosts(perso-desktop): Remove waydroid and distrobox 2025-02-04 23:09:21 +01:00
modules modules: Add minecraft 2025-02-01 17:55:46 +01:00
overlays kwin: Remove syncobj patch 2024-05-31 12:15:48 +02:00
tips Add Home Manager on others distros 2024-10-28 20:14:20 +01:00
.envrc flake.nix: Add comment, devShells and cleanup redendant inputs 2024-10-28 21:16:27 +01:00
.gitignore flake.nix: Add comment, devShells and cleanup redendant inputs 2024-10-28 21:16:27 +01:00
flake.lock Update OS 2025-02-02 21:07:37 +01:00
flake.nix flake.nix Avoid useless genericity for building nixosConfigurations 2025-02-04 22:12:47 +01:00
LICENSE Initial commit 2023-02-01 19:47:00 +01:00
README.md Add tips about nix-store optimize 2025-01-15 22:31:51 +01:00

Usefull commands

Configure

nixos-rebuild switch --flake flake_path_directory#hostname
nix flake update --extra-experimental-features "nix-command flakes"

Show changements between revisions

nix profile diff-closures --profile /nix/var/nix/profiles/system
nix store diff-closures /nix/var/nix/profiles/system-rev1-link /nix/var/nix/profiles/system-rev2-link

Clean system

List all profiles

nix profile history --profile /nix/var/nix/profiles/system

Remove all profiles older than 7 days

sudo nix profile wipe-history --older-than 7d --profile /nix/var/nix/profiles/system
nix profile wipe-history --older-than 7d --profile ~/.local/state/nix/profiles/home-manager

Clean up all useless store from old profiles

sudo nix store gc --debug

Optimize Store

nix-store --optimise

error: cached failure of attribute 'nixosConfigurations.perso-desktop.config.system.build.toplevel'

sudo rm -fr /root/.cache/nix/

To limit resources use during build

nixos-rebuild build-vm --cores 16 --max-jobs 1 --flake .#nixos-test

Or without NixOS

nix build .#nixosConfigurations.nixos-test.config.system.build.vm

Usefull links

Sources