users/ryan/modules/simple-bar/default.nix

d2b62c9d6f30a0ea88b2a235cde120cd10ba332b · 817 B · 30 lines raw

1 { config, lib, pkgs, ... }:
2
3 with lib;
4
5 let
6 cfg = config.ryan.simple-bar;
7 "simple-bar-upstream" = ./simple-bar-source;
8 in
9 {
10 options.ryan.simple-bar.enable = mkEnableOption "simple-bar";
11
12 config = mkIf cfg.enable {
13 home.file."Library/Application Support/Übersicht/widgets/simple-bar" = {
14 source = simple-bar-upstream;
15 recursive = false;
16 };
17 home.file.".simplebarrc".source = ./simplebarrc;
18
19 # Install the LaunchD services
20 launchd.agents.simple-bar-server = import ./server.nix { inherit config lib pkgs; };
21
22 launchd.agents.ubersicht = {
23 enable = true;
24 config = {
25 ProgramArguments = [ "/usr/bin/open" "-a" "Übersicht" ];
26 RunAtLoad = true;
27 };
28 };
29 };
30 }