Skip to content

Commit bbe81f8

Browse files
committed
docs: update nix page
close #245
1 parent ef4f956 commit bbe81f8

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

docs/guide/getting-started/nix.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,40 @@ Using Astal on Nix will require you to write a derivation for your project.
99
You can either copy and build off of these example flakes or you can
1010
incorporate the derivations into your existing flake/configuration.
1111

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

14-
:::details See answer
15-
A: <span style="font-size: 1.2em; font-weight: bold;">You don't.</span>
16-
17-
You can't install libraries globally on Nix as you would with regular
14+
In case you did not know already,
15+
you can't install libraries globally on Nix as you would with regular
1816
package managers like `pacman`, `dnf` or `apt`. You have to write a
1917
derivation for your projects like you would for any other program.
18+
If you try to install a library through `home.packages` or `environment.systemPackages`
19+
don't expect it to be picked up from runtimes.
20+
21+
However, if you want to use the CLI tool that comes with some of the libraries
22+
you have to **also** install them through `home.packages` or `environment.systemPackages`
23+
alongside your derivations.
24+
25+
### Astal CLI
26+
27+
The core library also comes with a CLI tool that you can use to send
28+
requests to your app.
29+
30+
:::code-group
31+
32+
```nix [nixos]
33+
environment.systemPackages = [inputs.astal.packages.${system}.default];
34+
```
35+
36+
```nix [home-manager]
37+
home.packages = [inputs.astal.packages.${system}.default];
38+
```
39+
2040
:::
2141

42+
```sh [astal cli]
43+
astal --list # list running instances
44+
```
45+
2246
## TypeScript
2347

2448
Using [AGS](https://aylur.github.io/ags/) as the bundler.

nix/devshell.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
vala-language-server
5555
vtsls
5656
vscode-langservers-extracted
57+
markdownlint-cli2
5758
];
5859
in {
5960
default = pkgs.mkShell {
@@ -64,10 +65,7 @@ in {
6465
buildInputs
6566
++ lsp
6667
++ builtins.attrValues (
67-
builtins.removeAttrs self.packages.${pkgs.system} [
68-
"docs"
69-
"cava" # FIXME: temporary autoreconf
70-
]
68+
builtins.removeAttrs self.packages.${pkgs.system} ["docs"]
7169
);
7270
};
7371
}

0 commit comments

Comments
 (0)