I want to check what group/option installs restic to my system, as it is installed by default for some reason.
nixos-option environment.systemPackages should work, if it’s added to your system package list.
1 Like
Getting issues
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
How can I fix this?
Do you use flakes for your NixOS config?
1 Like
Yup, here is the flake config. It is very basic, all the rest is in normal nixos configs
Use nix eval FLAKEURL#nixosConfigurations.$(hostname).options.environment.systemPackages.definitionsWithLocations (replace FLAKEURL with the location of your flake)
1 Like
Uhm 1. This is a real command? And 2. It spits out a wall of text, there are no linebreaks?
You can try piping it through jq or bat or such to make it prettier, e.g. add | nix run nixpkgs#jq to the end.
EDIT: you may also need --json on the nix eval command.
1 Like