From d1e8fd02b843df6a78e824b5ce70a50ba40d53fa Mon Sep 17 00:00:00 2001 From: _cry64 Date: Sat, 28 Feb 2026 23:55:49 +1000 Subject: [PATCH] [U] Update Nix install section --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54811ab1..c2c8072f 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,7 @@ Currently, these distributions have existing packages for HyFetch: * Universal [Lure.sh](https://lure.sh/): `lure in hyfetch` (Thanks to [@Elara6331](https://github.com/Elara6331)) * Arch Linux: `sudo pacman -S hyfetch` (Thanks to [@Aleksana](https://github.com/Aleksanaa) and [@Antiz96](https://github.com/Antiz96)) * Fedora Linux: `sudo dnf install hyfetch` (packaged by [@topazus](http://github.com/topazus)) -* Nix: `nix-env -i hyfetch` (Thanks to [@YisuiDenghua](https://github.com/YisuiDenghua)) -* Nix Profile: `nix profile install nixpkgs#hyfetch` +* Nix: see the [Nix install section](#nix-install) * Guix: `guix install hyfetch` (Thanks to [@WammKD](https://github.com/WammKD)) * Slackware: `sbopkg -b hyfetch` [Slackbuild](https://slackbuilds.org/repository/15.0/desktop/hyfetch/?search=hyfetch) (Thanks to [@bittin](https://github.com/bittin) , willysr (https://github.com/willysr), jebrhansen and Urchlay) * Homebrew: `brew install hyfetch` (Thanks to [@catumin](https://github.com/catumin) and [@osalbahr](https://github.com/osalbahr)) @@ -58,6 +57,45 @@ cargo install hyfetch > > The PyPI package has all the dependencies bundled, so it's recommended to use that instead. +### Method 4: Install using Nix {#nix-install} + +Hyfetch is available from the nixpkgs flake as [nixpkgs#hyfetch](https://search.nixos.org/packages?query=hyfetch&show=hyfetch). + +For a simple imperative install using either: +* Nix: `nix-env -i hyfetch` (Thanks to [@YisuiDenghua](https://github.com/YisuiDenghua)) +* Nix Profile: `nix profile install nixpkgs#hyfetch` + +But should be installed declaratively using [`programs.hyfetch` in home-manager](https://home-manager-options.extranix.com/?query=programs.hyfetch): +```nix +# example config (in your home.nix) +programs.hyfetch = { + enable = true; + settings = { + preset = "rainbow"; + mode = "rgb"; + auto_detect_light_dark = true; + light_dark = "dark"; # + lightness = 0.65; # 0.0-1.0 + color_align = { + mode = "vertical"; # horizontal/vertical/roll/random0 + }; + backend = "fastfetch"; # neofetch/fastfetch/macchina + args = null; + distro = "nixos"; # you can use "nixos_small" too! + pride_month_disable = false; + # note that ~/ (tilde) expansion will not work