Skip to content

Commit

Permalink
docs(admins): add install-nix
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Jun 24, 2024
1 parent 216e75b commit 3512566
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- [Install](./admins/install.md)
- [Docker Installation](./admins/install-docker.md)
- [Binary Installation](./admins/install-binary.md)
- [Nix/NixOS Installation](./admins/install-nix.md)
- [Environments](./admins/environments.md)
- [Create Account](./admins/create-account.md)

Expand Down
61 changes: 61 additions & 0 deletions docs/src/admins/install-nix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Nix/NixOS Installation

> Hatsu uses the `x86-64-v3` target architecture for optimal performance.
>
> If you are using an older processor, you currently need to build locally and change the corresponding values in `.cargo/config.toml`.
Hatsu is available in Nixpkgs, NUR and Flakes.

macOS (Darwin) is not supported.

## Nixpkgs

Nixpkgs only has a stable version, you need nixos-24.11 or nixos-unstable.

```nix
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
hatsu
];
}
```

## NUR (SN0WM1X)

The SN0WM1X NUR may contain beta versions, but there may be a delay.

You need to [follow the instructions to set up NUR](https://github.com/nix-community/nur#installation) first.

```nix
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
nur.repos.sn0wm1x.hatsu
];
}
```

## Flakes

> This is untested.
Add the hatsu repository directly to your flake inputs, up to date but unstable.

```nix
{
inputs: {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# ...
hatsu.url = "github:importantimport/hatsu";
hatsu.inputs.nixpkgs.follows = "nixpkgs";
# ...
};
}
```

```nix
{ inputs, pkgs, ... }: {
environment.systemPackages = [
inputs.hatsu.packages.${pkgs.system}.default;
];
}
```

0 comments on commit 3512566

Please sign in to comment.