home: i3: setup bluetooth mouse battery block

This commit is contained in:
Antoine Martin 2021-04-21 02:11:48 +02:00
parent 93eccb76ec
commit 0cdb05ecf1
5 changed files with 22 additions and 0 deletions

1
.gitattributes vendored
View file

@ -1,2 +1,3 @@
secrets/*.secret filter=git-crypt diff=git-crypt
secrets/wireguard.nix filter=git-crypt diff=git-crypt
home/secrets/*.secret filter=git-crypt diff=git-crypt

View file

@ -3,6 +3,7 @@
imports = [
./emacs.nix
./flameshot.nix
./secrets
./tmux.nix
./x
];

Binary file not shown.

13
home/secrets/default.nix Normal file
View file

@ -0,0 +1,13 @@
{ lib, ... }:
with lib;
{
options.my.secrets = mkOption {
type = types.attrs;
};
config.my.secrets = {
# I'm not sure hiding this is very important, but it *seems* like a bad idea
# to expose this
bluetooth-mouse-mac-address = fileContents ./bluetooth-mouse-mac-address.secret;
};
}

View file

@ -60,6 +60,13 @@ in
block = "networkmanager";
primary_only = true;
}
{
block = "bluetooth";
mac = config.my.secrets.bluetooth-mouse-mac-address;
hide_disconnected = true;
# TODO: use format when i3status-rust updates to v0.20
# format = "{percentage}";
}
{
block = "sound";
driver = "pulseaudio";