Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.6 KB

tips.md

File metadata and controls

56 lines (40 loc) · 1.6 KB

Tips

General

Installed packages

See list of all installed system packages along with their respective versions:

nix-store -q --references /var/run/current-system/sw | cut -d "-" -f2-

Or, you may put this code in your configuration.nix:

environment.etc."current-system-packages".text = let
    packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
    sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
    formatted = builtins.concatStringsSep "\n" sortedUnique;
  in
    formatted;

This creates a file (/etc/current-system-packages) with list of all installed packages with their respective versions. You can then view it easily like: cat /etc/current-system-packages or bat /etc/current-system-packages.

Home-Manager

To check the full log for rebuild failures caused by home-manager.service, run:

journalctl -u home-manager-user.service

To (temporarily) avoid writing a(n) (existing) xdg config file:

xdg.configFile."<dir>/<config.extension>".enable = false;

in home-manager.users.<user>. See this.

Kernel

The Linux kernel does not have Rust language support enabled by default. For kernel versions 6.7 or newer, experimental Rust support can be enabled. In a NixOS configuration, set (Ref):

boot.kernelPatches = [
    {
      name = "Rust Support";
      patch = null;
      features = {
        rust = true;
      };
    }
];