nix: add standalone project flake
This commit is contained in:
@@ -40,6 +40,23 @@ other workspaces.
|
||||
|
||||
## Build and install
|
||||
|
||||
### Nix
|
||||
|
||||
The project flake owns the Rust and GTK build dependencies. Build or run the
|
||||
locked package directly:
|
||||
|
||||
```sh
|
||||
nix build
|
||||
nix run . -- show
|
||||
```
|
||||
|
||||
Use `nix develop` for a shell containing Cargo, Clippy, rustfmt, and the native
|
||||
GTK dependencies. Downstream flakes can install
|
||||
`packages.${system}.default` and make this flake's `nixpkgs` input follow
|
||||
their own.
|
||||
|
||||
### Cargo
|
||||
|
||||
Run this from the directory containing this README:
|
||||
|
||||
```sh
|
||||
@@ -48,8 +65,9 @@ cargo clippy --workspace --all-targets -- -D warnings
|
||||
cargo install --path . --root ~/.local --force
|
||||
```
|
||||
|
||||
The binary is installed as `~/.local/bin/hypr-switcher`. The accompanying
|
||||
`../hyprland.conf` starts the daemon and defines the bindings:
|
||||
The binary is installed as `~/.local/bin/hypr-switcher`. A Nix profile usually
|
||||
exposes it as `~/.nix-profile/bin/hypr-switcher`. Configure the applicable
|
||||
absolute path, then start the daemon and define the bindings:
|
||||
|
||||
```ini
|
||||
$switcher = ~/.local/bin/hypr-switcher
|
||||
|
||||
Reference in New Issue
Block a user