diff --git a/hosts/be.lt.ts.hillion.co.uk/default.nix b/hosts/be.lt.ts.hillion.co.uk/default.nix index 5c301d2..e80d806 100644 --- a/hosts/be.lt.ts.hillion.co.uk/default.nix +++ b/hosts/be.lt.ts.hillion.co.uk/default.nix @@ -15,6 +15,7 @@ boot.loader.efi.canTouchEfiVariables = true; custom.defaults = true; + custom.laptop = true; ## Impermanence custom.impermanence = { diff --git a/modules/default.nix b/modules/default.nix index 041a4b4..05fb6e4 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -11,6 +11,7 @@ ./hostinfo.nix ./ids.nix ./impermanence.nix + ./laptop.nix ./locations.nix ./resilio.nix ./services/default.nix diff --git a/modules/home/tmux/default.nix b/modules/home/tmux/default.nix index 8f7f83f..4dbbd7b 100644 --- a/modules/home/tmux/default.nix +++ b/modules/home/tmux/default.nix @@ -11,7 +11,14 @@ in config = lib.mkIf cfg.enable { home-manager.users.jake.programs.tmux = { enable = true; - extraConfig = lib.readFile ./.tmux.conf; + + extraConfig = lib.strings.concatLines [ + (lib.readFile ./.tmux.conf) + + ''set -g status-right "${lib.strings.optionalString config.custom.laptop "#{battery_icon} #{battery_percentage} #{battery_remain} | "}\"#{=21:pane_title}\" %H:%M %d-%b-%y"'' + ]; + + plugins = with pkgs; lib.lists.optional config.custom.laptop tmuxPlugins.battery; }; }; } diff --git a/modules/laptop.nix b/modules/laptop.nix new file mode 100644 index 0000000..1f6d406 --- /dev/null +++ b/modules/laptop.nix @@ -0,0 +1,5 @@ +{ pkgs, lib, config, ... }: + +{ + options.custom.laptop = lib.mkEnableOption "laptop"; +}