nix: add standalone project flake

This commit is contained in:
2026-08-16 21:52:28 -07:00
parent 67562f4e92
commit d57c3177c1
4 changed files with 133 additions and 3 deletions
+20 -2
View File
@@ -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