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/*.secret filter=git-crypt diff=git-crypt
secrets/wireguard.nix 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 = [ imports = [
./emacs.nix ./emacs.nix
./flameshot.nix ./flameshot.nix
./secrets
./tmux.nix ./tmux.nix
./x ./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"; block = "networkmanager";
primary_only = true; 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"; block = "sound";
driver = "pulseaudio"; driver = "pulseaudio";