91 lines
2.4 KiB
Nix
91 lines
2.4 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
waybar_available_memory =
|
|
(pkgs.writeScriptBin "waybar_custom_available_memory" (
|
|
builtins.readFile ./files/waybar_scripts/waybar_available_memory_linux.bash
|
|
)).overrideAttrs
|
|
(old: {
|
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
|
|
|
});
|
|
waybar_battery =
|
|
(pkgs.writeScriptBin "waybar_custom_battery" (
|
|
builtins.readFile ./files/waybar_scripts/waybar_battery_linux.bash
|
|
)).overrideAttrs
|
|
(old: {
|
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
|
|
|
});
|
|
waybar_clock =
|
|
(pkgs.writeScriptBin "waybar_custom_clock" (
|
|
builtins.readFile ./files/waybar_scripts/waybar_custom_clock.py
|
|
)).overrideAttrs
|
|
(old: {
|
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
|
|
|
});
|
|
waybar_night_mode =
|
|
(pkgs.writeScriptBin "waybar_night_mode" (
|
|
builtins.readFile ./files/waybar_scripts/waybar_night_mode.bash
|
|
)).overrideAttrs
|
|
(old: {
|
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
|
|
|
});
|
|
waybar_sound =
|
|
(pkgs.writeScriptBin "waybar_custom_sound" (
|
|
builtins.readFile ./files/waybar_scripts/waybar_sound_linux.bash
|
|
)).overrideAttrs
|
|
(old: {
|
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
|
|
|
});
|
|
waybar_temperature =
|
|
(pkgs.writeScriptBin "waybar_custom_temperature" (
|
|
builtins.readFile ./files/waybar_scripts/waybar_temperature_linux.bash
|
|
)).overrideAttrs
|
|
(old: {
|
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
|
|
|
});
|
|
in
|
|
{
|
|
imports = [ ];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
waybar
|
|
waybar_available_memory
|
|
waybar_battery
|
|
waybar_clock
|
|
waybar_night_mode
|
|
waybar_sound
|
|
waybar_temperature
|
|
python3 # for clock TODO python should not be in the system packages, maybe switch to a venv? ref https://nixos.wiki/wiki/Python
|
|
bc # for temperature and sound
|
|
jq # for memory, battery, sound, night mode, and temperature
|
|
upower # for battery
|
|
wlsunset # for night mode
|
|
];
|
|
|
|
services.upower.enable = true; # for battery
|
|
|
|
home-manager.users.talexander =
|
|
{ pkgs, ... }:
|
|
{
|
|
home.file = {
|
|
".config/waybar/config" = {
|
|
source = ./files/waybar_config.json;
|
|
};
|
|
".config/waybar/style.css" = {
|
|
source = ./files/style.css;
|
|
};
|
|
};
|
|
};
|
|
|
|
}
|