From bcce1065d983a072854157085dfc028b0fcc4dd9 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sun, 25 Jan 2026 11:08:56 +0100 Subject: feat(workstation): add rsqlite script --- nixos/hosts/ev/default.nix | 5 +++++ nixos/hosts/tente/default.nix | 5 +++++ nixos/profiles/workstation/scripts/rsqlite | 15 +++++++++++++++ 3 files changed, 25 insertions(+) create mode 100755 nixos/profiles/workstation/scripts/rsqlite diff --git a/nixos/hosts/ev/default.nix b/nixos/hosts/ev/default.nix index 0b8b2f3..d5737fa 100644 --- a/nixos/hosts/ev/default.nix +++ b/nixos/hosts/ev/default.nix @@ -56,6 +56,11 @@ in time.timeZone = "Europe/Vienna"; + environment.systemPackages = with pkgs; [ + # The essentials are installed via the imported profile. + sqlite-interactive + ]; + fileSystems = { "/mnt/personal" = { device = "UUID=5587670d-9a50-4068-baca-17f5360f9ff9"; diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix index 2b4fafb..fe9b0a5 100644 --- a/nixos/hosts/tente/default.nix +++ b/nixos/hosts/tente/default.nix @@ -53,6 +53,11 @@ in time.timeZone = "Europe/Vienna"; + environment.systemPackages = with pkgs; [ + # The essentials are installed via the imported profile. + sqlite-interactive + ]; + users.groups = { www-generator = {}; www-personal = {}; diff --git a/nixos/profiles/workstation/scripts/rsqlite b/nixos/profiles/workstation/scripts/rsqlite new file mode 100755 index 0000000..d9dc2ae --- /dev/null +++ b/nixos/profiles/workstation/scripts/rsqlite @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +if [[ "$#" != 2 && "$#" != "3" ]]; then + echo "usage: $0 [sql]" + exit 1 +fi + +printf -v path %q "$2" + +if [[ "$#" == "3" ]]; then + printf -v sql %q "$3" +else + sql="" +fi + +ssh "$1" -t "sudo su -c 'sqlite3 /var/lib/$path $sql'" -- cgit v1.3.1