Skip to content

Commit

Permalink
docs: update nix page
Browse files Browse the repository at this point in the history
close #245
  • Loading branch information
Aylur committed Jan 12, 2025
1 parent ef4f956 commit bbe81f8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
34 changes: 29 additions & 5 deletions docs/guide/getting-started/nix.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,40 @@ Using Astal on Nix will require you to write a derivation for your project.
You can either copy and build off of these example flakes or you can
incorporate the derivations into your existing flake/configuration.

## Q: "How do I install Astal on Nix?"
## Installing libraries versus installing executables

:::details See answer
A: <span style="font-size: 1.2em; font-weight: bold;">You don't.</span>

You can't install libraries globally on Nix as you would with regular
In case you did not know already,
you can't install libraries globally on Nix as you would with regular
package managers like `pacman`, `dnf` or `apt`. You have to write a
derivation for your projects like you would for any other program.
If you try to install a library through `home.packages` or `environment.systemPackages`
don't expect it to be picked up from runtimes.

However, if you want to use the CLI tool that comes with some of the libraries
you have to **also** install them through `home.packages` or `environment.systemPackages`
alongside your derivations.

### Astal CLI

The core library also comes with a CLI tool that you can use to send
requests to your app.

:::code-group

```nix [nixos]
environment.systemPackages = [inputs.astal.packages.${system}.default];
```

```nix [home-manager]
home.packages = [inputs.astal.packages.${system}.default];
```

:::

```sh [astal cli]
astal --list # list running instances
```

## TypeScript

Using [AGS](https://aylur.github.io/ags/) as the bundler.
Expand Down
6 changes: 2 additions & 4 deletions nix/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
vala-language-server
vtsls
vscode-langservers-extracted
markdownlint-cli2
];
in {
default = pkgs.mkShell {
Expand All @@ -64,10 +65,7 @@ in {
buildInputs
++ lsp
++ builtins.attrValues (
builtins.removeAttrs self.packages.${pkgs.system} [
"docs"
"cava" # FIXME: temporary autoreconf
]
builtins.removeAttrs self.packages.${pkgs.system} ["docs"]
);
};
}

0 comments on commit bbe81f8

Please sign in to comment.