Compare commits

...

2 commits

2 changed files with 19 additions and 0 deletions

View file

@ -16,6 +16,12 @@ in
example = ["Core 0" "Core 1" "Core 2" "Core 3"]; example = ["Core 0" "Core 1" "Core 2" "Core 3"];
default = ""; default = "";
}; };
networking.throughput_interfaces = mkOption {
type = types.listOf types.str;
example = [ "wlp1s0" ];
default = [ ];
};
}; };
config = lib.mkIf isEnabled { config = lib.mkIf isEnabled {
@ -73,6 +79,18 @@ in
chip = cfg.temperature.chip; chip = cfg.temperature.chip;
inputs = cfg.temperature.inputs; inputs = cfg.temperature.inputs;
} }
] ++ (lib.lists.optionals ((builtins.length cfg.networking.throughput_interfaces) != 0)
(map
(interface:
{
block = "net";
device = interface;
interval = 1;
hide_inactive = true;
})
cfg.networking.throughput_interfaces)
) ++ [
{ {
block = "networkmanager"; block = "networkmanager";
primary_only = true; primary_only = true;

View file

@ -5,6 +5,7 @@
my.home.x.enable = true; my.home.x.enable = true;
my.home.x.i3bar.temperature.chip = "k10temp-pci-*"; my.home.x.i3bar.temperature.chip = "k10temp-pci-*";
my.home.x.i3bar.temperature.inputs = [ "Tccd1" ]; my.home.x.i3bar.temperature.inputs = [ "Tccd1" ];
my.home.x.i3bar.networking.throughput_interfaces = [ "enp8s0" "wlp4s0" ];
my.home.emacs.enable = true; my.home.emacs.enable = true;
my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight; my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight;