use waybar from git

This commit is contained in:
Reid 2024-05-02 16:56:45 -07:00
parent 75f7cbffa2
commit 5f5c70958e
3 changed files with 63 additions and 3 deletions

52
flake.lock generated
View file

@ -34,6 +34,22 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"hardware": {
"locked": {
"lastModified": 1711352745,
@ -483,6 +499,22 @@
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1711163522,
"narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"catppuccin-vsc": "catppuccin-vsc",
@ -495,6 +527,7 @@
"hyprpaper": "hyprpaper",
"nix-colors": "nix-colors",
"nixpkgs": "nixpkgs_7",
"waybar": "waybar",
"waybar-catppuccin": "waybar-catppuccin"
}
},
@ -603,6 +636,25 @@
"type": "github"
}
},
"waybar": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1714680561,
"narHash": "sha256-ov7v4OaiMW6gylMFTjKXXtoxrgAjtOTHa09oFmu3B3s=",
"owner": "Alexays",
"repo": "Waybar",
"rev": "0b6476da32d181ee6b2cabdc5205a46a90521a75",
"type": "github"
},
"original": {
"owner": "Alexays",
"repo": "Waybar",
"type": "github"
}
},
"waybar-catppuccin": {
"flake": false,
"locked": {

View file

@ -10,6 +10,8 @@
hardware.url = "github:nixos/nixos-hardware";
nix-colors.url = "github:misterio77/nix-colors";
waybar.url = "github:Alexays/Waybar";
hyprland.url = "github:hyprwm/Hyprland";
hyprlock.url = "github:hyprwm/hyprlock";
hypridle.url = "github:hyprwm/hypridle";

View file

@ -1,17 +1,23 @@
{ lib, config, pkgs, inputs, ... }:
{ lib, config, pkgs, inputs, system, ... }:
with lib;
let
cfg = config.modules.desktop.waybar;
in {
options.modules.desktop.waybar = {
enable = mkEnableOption "Enable Waybar, a lightweight desktop environment based on GTK+";
enable = mkEnableOption "Enable Waybar, a highly customizable wayland bar for wlroots compositors.";
package = mkOption {
type = types.package;
default = inputs.waybar.packages.${system}.default;
example = "pkgs.waybar";
};
};
config = mkIf cfg.enable {
hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe pkgs.waybar}" ];
hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe cfg.package}" ];
hm.programs.waybar = {
enable = true;
package = cfg.package;
style = builtins.concatStringsSep "\n" [
"@import \"${inputs.waybar-catppuccin}/themes/mocha.css\";"
(lib.readFile ../../config/waybar.css)