From 8f71fac972b4fe5a98459148d9b33d1748deaa7f Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Mon, 6 Jul 2026 22:50:11 -0400 Subject: initial simple-bar config --- users/ryan/modules/simple-bar/server.nix | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 users/ryan/modules/simple-bar/server.nix (limited to 'users/ryan/modules/simple-bar/server.nix') diff --git a/users/ryan/modules/simple-bar/server.nix b/users/ryan/modules/simple-bar/server.nix new file mode 100644 index 0000000..f9b636c --- /dev/null +++ b/users/ryan/modules/simple-bar/server.nix @@ -0,0 +1,34 @@ +{ pkgs, lib, ... }: +let + src = builtins.fetchGit { + url = "https://github.com/Jean-Tinland/simple-bar-server.git"; + rev = "0c99921d023b459e44bbba8cca6d8947262359b6"; + shallow = true; + }; + + simple-bar-server = pkgs.buildNpmPackage { + pname = "simple-bar-server"; + version = "0-unstable"; + inherit src; + + npmDepsHash = "sha256-JKUiOqAAoE/TJriErvaaT03uKtX8t1gFh+JzG4GcriI="; + dontNpmBuild = true; # no build script, it's just a server + + installPhase = '' + runHook preInstall + mkdir -p $out/lib/simple-bar-server + cp -r . $out/lib/simple-bar-server/ + runHook postInstall + ''; + }; +in +{ + enable = true; + config = { + ProgramArguments = [ "${pkgs.nodejs}/bin/node" "${simple-bar-server}/lib/simple-bar-server/index.js" ]; + KeepAlive = true; + RunAtLoad = true; + StandardOutPath = "/tmp/simple-bar-server.out.log"; + StandardErrorPath = "/tmp/simple-bar-server.err.log"; + }; +} -- cgit v1.3