diff --git a/.gitattributes b/.gitattributes index 0fe79d9..62988e9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/home/default.nix b/home/default.nix index 0da2e12..cc7cb84 100644 --- a/home/default.nix +++ b/home/default.nix @@ -3,6 +3,7 @@ imports = [ ./emacs.nix ./flameshot.nix + ./secrets ./tmux.nix ./x ]; diff --git a/home/secrets/bluetooth-mouse-mac-address.secret b/home/secrets/bluetooth-mouse-mac-address.secret new file mode 100644 index 0000000..cc6ff3c Binary files /dev/null and b/home/secrets/bluetooth-mouse-mac-address.secret differ diff --git a/home/secrets/default.nix b/home/secrets/default.nix new file mode 100644 index 0000000..71b63a9 --- /dev/null +++ b/home/secrets/default.nix @@ -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; + }; +} diff --git a/home/x/i3bar.nix b/home/x/i3bar.nix index bd6028d..4ebc301 100644 --- a/home/x/i3bar.nix +++ b/home/x/i3bar.nix @@ -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";