about summary refs log tree commit diff
path: root/users/tazjin/dotfiles/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/dotfiles/default.nix')
-rw-r--r--users/tazjin/dotfiles/default.nix18
1 files changed, 16 insertions, 2 deletions
diff --git a/users/tazjin/dotfiles/default.nix b/users/tazjin/dotfiles/default.nix
index d536d3a494cd..79c5c2ecad40 100644
--- a/users/tazjin/dotfiles/default.nix
+++ b/users/tazjin/dotfiles/default.nix
@@ -1,8 +1,22 @@
-args: {
+{ depot, pkgs, ... }@args:
+
+rec {
   dunstrc = ./dunstrc;
   niri = ./niri.config.kdl;
   waybar = {
     config = import ./waybar/config.nix args;
-    style = ./waybar/style.css;
+    style = pkgs.runCommandNoCC "waybar-style.css"
+      {
+        CHICAGO95 = depot.third_party.chicago95;
+      } ''
+      cat ${./waybar/style.css} | ${pkgs.envsubst}/bin/envsubst > $out
+    '';
   };
+
+  # Helper derivation for iterating on waybar config.
+  waybarTest = pkgs.runCommandNoCC "waybar-conf" { } ''
+    mkdir -p $out
+    cat ${pkgs.writeText "waybar-conf.json" (builtins.toJSON(builtins.attrValues waybar.config))} > $out/config
+    cp ${waybar.style} $out/style.css
+  '';
 }