about summary refs log tree commit diff stats
path: root/modules/by-name/ri/river/river-start
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/ri/river/river-start')
-rw-r--r--modules/by-name/ri/river/river-start/package.nix23
-rwxr-xr-xmodules/by-name/ri/river/river-start/river-start.sh20
2 files changed, 43 insertions, 0 deletions
diff --git a/modules/by-name/ri/river/river-start/package.nix b/modules/by-name/ri/river/river-start/package.nix
new file mode 100644
index 00000000..10957cc0
--- /dev/null
+++ b/modules/by-name/ri/river/river-start/package.nix
@@ -0,0 +1,23 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+{
+  writeShellApplication,
+  river,
+}:
+writeShellApplication {
+  name = "river-start";
+  text = builtins.readFile ./river-start.sh;
+  runtimeInputs = [
+    river
+  ];
+  meta = {
+    mainProgram = "river-start";
+  };
+}
diff --git a/modules/by-name/ri/river/river-start/river-start.sh b/modules/by-name/ri/river/river-start/river-start.sh
new file mode 100755
index 00000000..e3a4adcb
--- /dev/null
+++ b/modules/by-name/ri/river/river-start/river-start.sh
@@ -0,0 +1,20 @@
+#! /usr/bin/env sh
+
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+
+# NOTE: Keep this in sync with the file from `base_init.sh` <2025-02-03>
+RIVER_LOG_FILE="$HOME/.local/share/river/log"
+
+[ -d "$(dirname "$RIVER_LOG_FILE")" ] || mkdir --parents "$(dirname "$RIVER_LOG_FILE")"
+
+exec river -log-level info >"$RIVER_LOG_FILE" 2>&1
+
+# vim: ft=sh