nix-decred/docs/bisonw.md
stakeynet 845c82d65c
init bisonw at 1.0.4
Signed-off-by: stakeynet <git@stakey.net>
2025-11-29 13:10:29 -08:00

76 lines
1.9 KiB
Markdown

# bisonw options
`services.bisonw` wraps the Bison Wallet daemon. You can provide either a rendered configuration through `services.bisonw.settings` or point at an existing file with `services.bisonw.configFile`.
## sops-nix
Render `dexc.conf` with `sops-nix` and point the service at it. Example:
```nix
{ config, lib, pkgs, ... }:
{
# Define credentials as secrets
sops.secrets."bisonw/rpcpass" = {};
# Render dexc.conf owned by the bisonw service user/group
sops.templates."dexc.conf" = {
owner = config.services.bisonw.user;
group = config.services.bisonw.group;
mode = "0440";
restartUnits = [ "bisonw.service" ];
content = ''
[Application Options]
testnet=1
log=info
webaddr=127.0.0.1:5758
rpclisten=127.0.0.1:5757
rpcuser=user
rpcpass=${config.sops.placeholder."bisonw/rpcpass"}
'';
};
# Ensure bisonw only starts when the config exists
systemd.services.bisonw.unitConfig.ConditionPathExists =
config.sops.templates."dexc.conf".path;
# Point the module to the rendered config
services.bisonw = {
enable = true;
configFile = config.sops.templates."dexc.conf".path;
};
}
```
## Nix Store Configuration
If you do not need to manage secrets, you can render settings directly into the Nix store.
```nix
services.bisonw = {
enable = true;
settings = {
testnet = true;
log = "info";
webaddr = "127.0.0.1:5758";
rpclisten = [ "127.0.0.1:5757" "192.168.1.10:5757" ];
};
};
```
## Operator Access
Provides `bwctl` for the named user and places them in the service group so they can interact with the daemon.
```nix
services.bisonw.operator = {
enable = true;
name = "myusername";
};
```
## Data Directory
- `services.bisonw.dataDir` defaults to `/var/lib/bisonw`. The service owns and uses this path as `HOME` and `XDG_DATA_HOME`.
- The unit runs as the `services.bisonw.user`/`group` (default `bisonw`).