Add the waybar scripts.
This commit is contained in:
@@ -4,14 +4,76 @@
|
||||
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, ... }:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user