diff --git a/README.md b/README.md index 48d2907..d970642 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,75 @@ You can then run the `anifetch` command **directly in your terminal**. Since pipx installs packages in an isolated environment, you won't have to worry about dependency conflicts or polluting your global python environment. `anifetch` will behave just like a native cli tool. You can upgrade your installation with `pipx upgrade anifetch` +--- + +### ❄️ NixOS installation via flakes + +❄️ Add the anifetch repo as a flake input: + +```nix +{ + inputs = { + anifetch = { + url = "github:Notenlish/anifetch"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; +} +``` + +Remember to add: + +```nix + specialArgs = {inherit inputs;}; +``` + +to your nixos configuration, like I've done here on my system: + +```nix + nixosConfigurations = { + Enlil = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs;}; +``` + +#### ❄️ As a package: + +Add anifetch to your packages list like so: + +```nix +{inputs, pkgs, ...}: { + environment.systemPackages = with pkgs; [ + inputs.anifetch.packages.${pkgs.system}.default + fastfetch # Choose either fastfetch or neofetch to run anifetch with + neofetch + ]; +} +``` + +#### ❄️ As an overlay: + +Add the overlay to nixpkgs overlays, then add the package to your package list as you would a package from the normal nixpkgs repo. + +```nix +{inputs, pkgs, ...}: { + nixpkgs = { + overlays = [ + inputs.anifetch.overlays.anifetch + ]; + }; + + environment.systemPackages = with pkgs; [ + anifetch + fastfetch # Choose either fastfetch or neofetch to run anifetch with + neofetch + ]; +} +``` + +The Nix package contains all the dependencies in a wrapper script for the application aside from fastfetch or neofetch, so you should only need to add one of those to your package list as well. + +After you've done these steps, rebuild your system. + --- ### 👨‍💻 Developer Installation (for contributors): via `pip` in a virtual environment