Skip to content

Commit

Permalink
update Install.md
Browse files Browse the repository at this point in the history
  • Loading branch information
id3v1669 committed Sep 18, 2024
1 parent ea68984 commit d690ef4
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,52 @@

We have packaged `swhkd-git`. `swhkd-bin` has been packaged separately by a user of swhkd.

## NixOS

For now flake users only.

This repo contains a NixOS Module for swhkd service.
To enable module add an input first and import to modules:
```nix
{
inputs = {
swhkd.url = "github:id3v1669/swhkd";
}
outputs = {nixpkgs, swhkd, ...} @ inputs: {
nixosConfigurations.HOSTNAME = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
swhkd.nixosModules.default
];
};
}
}
```
After importing you should be able to use it in your configuration.nix file:
```nix
{ inputs
, ...
}:
{
services.swhkd = {
enable = true;
package = inputs.swhkd.packages.${system}.default;
cooldown = 300;
settings = ''
super + return
alacritty
'';
};
}
```
* Do not forget to start/add to autostart swhkd of your system after login.
* Replace HOSTNAME with your oun

ps. this module will be updated after refactor of security model, but
it is already good enough to use

# Building:

`swhkd` and `swhks` install to `/usr/local/bin/` by default. You can change this behaviour by editing the [Makefile](../Makefile) variable, `DESTDIR`, which acts as a prefix for all installed files. You can also specify it in the make command line, e.g. to install everything in `subdir`: `make DESTDIR="subdir" install`.
Expand Down

0 comments on commit d690ef4

Please sign in to comment.