From f75ff6849d5115f40660b6318f5f1842c0c03d58 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sat, 24 Jul 2021 02:18:15 +0200 Subject: [PATCH 1/2] home: allow marking device as laptop --- home/default.nix | 1 + home/laptop.nix | 6 ++++++ hosts/zephyrus/home.nix | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 home/laptop.nix diff --git a/home/default.nix b/home/default.nix index 10ebaae..b383e47 100644 --- a/home/default.nix +++ b/home/default.nix @@ -6,6 +6,7 @@ ./env.nix ./fish ./flameshot.nix + ./laptop.nix ./secrets ./starship.nix ./themes diff --git a/home/laptop.nix b/home/laptop.nix new file mode 100644 index 0000000..ef4d266 --- /dev/null +++ b/home/laptop.nix @@ -0,0 +1,6 @@ +{ config, lib, ... }: +{ + options.my.home.laptop = with lib; { + enable = mkEnableOption "Laptop settings"; + }; +} diff --git a/hosts/zephyrus/home.nix b/hosts/zephyrus/home.nix index 7646d14..0e12176 100644 --- a/hosts/zephyrus/home.nix +++ b/hosts/zephyrus/home.nix @@ -1,6 +1,8 @@ { config, pkgs, ... }: { home-manager.users.alarsyo = { + my.home.laptop.enable = true; + # Keyboard settings & i3 settings my.home.x.enable = true; my.home.x.i3bar.temperature.chip = "coretemp-isa-*"; From 67b91f8c88be1beb2cf4d717587e2dbd70bae459 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sat, 24 Jul 2021 02:18:27 +0200 Subject: [PATCH 2/2] home: i3bar: show battery for laptops --- home/x/i3bar.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/home/x/i3bar.nix b/home/x/i3bar.nix index dadde9b..afa170e 100644 --- a/home/x/i3bar.nix +++ b/home/x/i3bar.nix @@ -93,6 +93,11 @@ in block = "sound"; driver = "pulseaudio"; } + ] ++ (lib.lists.optionals config.my.home.laptop.enable [ + { + block = "battery"; + } + ]) ++ [ # { # block = "notify"; # }