Update wiki 6684949995

master
github-actions 9 months ago
parent
commit
ac793432fc
  1. 3
      Home.md
  2. 1
      _Sidebar.md
  3. 54
      nix-local-setup.md

3
Home.md

@ -4,9 +4,10 @@ Welcome to the onefetch's wiki! @@ -4,9 +4,10 @@ Welcome to the onefetch's wiki!
- **General**
- [Installation](https://github.com/o2sh/onefetch/wiki/installation)
- [Getting started](https://github.com/o2sh/onefetch/wiki/getting-started)
- [Nix local setup](https://github.com/o2sh/onefetch/wiki/nix-local-setup)
- **Options**
- [Command-line options](https://github.com/o2sh/onefetch/wiki/command-line-options)
- **Images**
- [Images in the terminal](https://github.com/o2sh/onefetch/wiki/Images-in-the-terminal)
- [Images in the terminal](https://github.com/o2sh/onefetch/wiki/images-in-the-terminal)
- **Ascii**
- [Ascii art](https://github.com/o2sh/onefetch/wiki/ascii-art)

1
_Sidebar.md

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
- **General**
- [Installation](https://github.com/o2sh/onefetch/wiki/installation)
- [Getting started](https://github.com/o2sh/onefetch/wiki/getting-started)
- [Nix local setup](https://github.com/o2sh/onefetch/wiki/nix-local-setup)
- **Options**
- [Command-line options](https://github.com/o2sh/onefetch/wiki/command-line-options)
- **Images**

54
nix-local-setup.md

@ -0,0 +1,54 @@ @@ -0,0 +1,54 @@
# Nix as a Development Environment
[Nix](https://nixos.org/) is a package manager that uses a purely functional approach to dependency management. Packages in Nix are built and run in isolated, reproducible environments. This tutorial walks you through setting up a development environment for [Onefetch](https://github.com/o2sh/onefetch) using Nix.
> This guide assumes you already have Nix [installed](https://nixos.org/download.html#nix-quick-install) on your system.
## Setup
To begin, create a `flake.nix` file with the following content:
```nix
{
description = "onefetch";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = {
self,
nixpkgs,
...
}: let
forAllSystems = fn: nixpkgs.lib.genAttrs [
"aarch64-darwin"
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"x86_64-darwin"
] (system: fn nixpkgs.legacyPackages.${system});
in {
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
name = "onefetch";
packages = with pkgs; [
cargo
rustc
clippy
rustfmt
rust-analyzer
cmake
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
});
};
}
```
then enter the development shell:
```bash
nix develop
```
Loading…
Cancel
Save