diff options
Diffstat (limited to 'users/ryan/modules/simple-bar/default.nix')
| -rw-r--r-- | users/ryan/modules/simple-bar/default.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/users/ryan/modules/simple-bar/default.nix b/users/ryan/modules/simple-bar/default.nix new file mode 100644 index 0000000..116216f --- /dev/null +++ b/users/ryan/modules/simple-bar/default.nix | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | { config, lib, pkgs, ... }: | ||
| 2 | |||
| 3 | with lib; | ||
| 4 | |||
| 5 | let | ||
| 6 | cfg = config.ryan.simple-bar; | ||
| 7 | # Fetch the git repo at a specific rev | ||
| 8 | "simple-bar-upstream" = builtins.fetchGit { | ||
| 9 | url = "https://github.com/Jean-Tinland/simple-bar"; | ||
| 10 | rev = "fb5cada548a05bd01f727772c0a18fd8c7f65b42"; | ||
| 11 | shallow = true; | ||
| 12 | }; | ||
| 13 | in | ||
| 14 | { | ||
| 15 | options.ryan.simple-bar.enable = mkEnableOption "simple-bar"; | ||
| 16 | |||
| 17 | config = mkIf cfg.enable { | ||
| 18 | home.file."Library/Application Support/Übersicht/widgets/simple-bar" = { | ||
| 19 | source = simple-bar-upstream; | ||
| 20 | recursive = false; | ||
| 21 | }; | ||
| 22 | home.file.".simplebarrc".source = ./simplebarrc; | ||
| 23 | |||
| 24 | # Install the LaunchD services | ||
| 25 | launchd.agents.simple-bar-server = import ./server.nix { inherit config lib pkgs; }; | ||
| 26 | |||
| 27 | launchd.agents.ubersicht = { | ||
| 28 | enable = true; | ||
| 29 | config = { | ||
| 30 | ProgramArguments = [ "/usr/bin/open" "-a" "Übersicht" ]; | ||
| 31 | RunAtLoad = true; | ||
| 32 | }; | ||
| 33 | }; | ||
| 34 | }; | ||
| 35 | } | ||
