No description
Find a file
Florian RICHER 735a5b12f8
Some checks failed
check / docker (push) Failing after 1s
Remove unused vars
2024-05-24 16:58:19 +02:00
.gitea/workflows Try first github action 2024-05-24 16:55:50 +02:00
.vscode Add vscode autocomplete for nix (nixd) 2024-04-28 20:07:42 +02:00
home Add atuin 2024-05-23 21:19:05 +02:00
hosts Add env var 2024-05-23 20:56:27 +02:00
modules Begin add AI module 2024-05-24 14:04:57 +02:00
overlays/kwin kwin: Add overlays with 5511 patch 2024-05-22 00:27:31 +02:00
.gitignore gitignore: Ignore .swp 2024-03-08 21:10:42 +01:00
flake.lock Update OS 2024-05-23 20:07:24 +02:00
flake.nix Remove unused vars 2024-05-24 16:58:19 +02:00
LICENSE Initial commit 2023-02-01 19:47:00 +01:00
README.md Add home-manager profiles in purge docs 2024-04-13 23:52:35 +02:00
TODO Begin add TODO 2024-05-18 00:29:05 +02: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

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

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

If package is marked as insecure

Example:

error: Package 'nix-2.16.2' in /nix/store/nra828scc8qs92b9pxra5csqzffb6hpl-source/pkgs/tools/package-management/nix/default.nix:229 is marked as insecure, refusing to evaluate.

Known issues:

  • CVE-2024-27297
nix path-info -r /run/current-system | grep nix-2.16.2

Result:

[...]

/nix/store/g4ss2h40n3j37bq20x1qw5s7nl82lch5-nix-2.16.2

[...]

nix-store -q --referrers /nix/store/g4ss2h40n3j37bq20x1qw5s7nl82lch5-nix-2.16.2

Result:

/nix/store/g4ss2h40n3j37bq20x1qw5s7nl82lch5-nix-2.16.2

/nix/store/72pfc05339izcwqhlbs8441brrdasas7-nix-2.16.2-dev

/nix/store/ln2z5d5izn8icm3wx94ci13ad19lzjhr-nixd-1.2.3

nixd is not up to date and require nix 2.16.2

Usefull links

Sources