Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ You can then run the program in two ways:
⚠️ Please avoid using `pip install` outside a virtual environment on systems like Ubuntu.
This is restricted by [PEP 668](https://peps.python.org/pep-0668/) to protect the system Python.

On Nix you can run:

```bash
nix develop
pip install -e .
```

inside the anifetch dir after cloning the repo. This creates a python venv you can re-enter by running `nix develop` inside the project dir.

## ▶️ How to Use It

You don't need to configure anything for `fastfetch` or `neofetch`. If they already work on your machine, `anifetch` will detect and use them automatically. Please note that one of these must be installed, otherwise anifetch won't work. To use **fastfetch**, you must append `-ff` to the anifetch command.
Expand Down
27 changes: 27 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,32 @@
overlays = import ./nix/overlays;

formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);

devShell = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
myPython = pkgs.python3;
pythonWithPkgs = myPython.withPackages (ps: [
ps.pip
ps.setuptools
]);
venv = "venv";
in
pkgs.mkShell {
packages = [
pythonWithPkgs
pkgs.bc
pkgs.chafa
pkgs.ffmpeg
];

shellHook = ''
if [ ! -d "${venv}" ]; then
echo "Creating Python venv..."
python3 -m venv ${venv}
fi
echo "Activating venv..."
source ${venv}/bin/activate
'';
});
};
}