diff --git a/nixos/flake.nix b/nixos/flake.nix index aa7e0d6..7aebcde 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -1,8 +1,5 @@ { inputs = { - - - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; vscode-server.url = "github:nix-community/nixos-vscode-server"; diff --git a/nixos/hosts/sunken-ship.nix b/nixos/hosts/sunken-ship.nix index e12c666..4774878 100644 --- a/nixos/hosts/sunken-ship.nix +++ b/nixos/hosts/sunken-ship.nix @@ -22,8 +22,7 @@ in boot.kernelParams = [ "consoleblank=60" ]; # blank TTY after 60s to reduce burn-in # Turn off panel backlight after boot so the screen actually dims (consoleblank only blanks framebuffer). - # At the console, run: light -S 100 (or any 0–100) to restore brightness. - programs.light.enable = true; + # At the console, run: brightnessctl set 100% (or `brightnessctl max`) to restore brightness. systemd.services.server-backlight-off = { description = "Turn off panel backlight after console idle (reduce burn-in)"; after = [ "multi-user.target" ]; @@ -42,7 +41,7 @@ in users.users.danny = { isNormalUser = true; - extraGroups = [ "wheel" "video" ]; # video: backlight control via light(1) + extraGroups = [ "wheel" "video" ]; # video: backlight control via sysfs / brightnessctl # SSH keys: push via scp, don't commit. NixOS does not manage authorized_keys so scp'd keys persist. # Example: scp ~/.ssh/id_ed25519_sunken_ship.pub danny@server:/tmp/ then on server: mkdir -p ~/.ssh; cat /tmp/*.pub >> ~/.ssh/authorized_keys }; @@ -59,7 +58,10 @@ in # Passwordless sudo for wheel. security.sudo.wheelNeedsPassword = false; - environment.systemPackages = [ pkgs.git ]; # for clone/bootstrap and timer + environment.systemPackages = with pkgs; [ + git # clone/bootstrap and dotfiles-rebuild timer + brightnessctl # manual backlight; replaces removed `light` from nixpkgs + ]; # Pull dotfiles and rebuild if the repo has new commits. systemd.services.dotfiles-rebuild = { diff --git a/raycast-scripts/char-count.sh b/raycast-scripts/char-count.sh index 268cedc..f4f09e4 100755 --- a/raycast-scripts/char-count.sh +++ b/raycast-scripts/char-count.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash +set -euo pipefail # Required parameters: # @raycast.schemaVersion 1 @@ -7,11 +8,11 @@ # Optional parameters: # @raycast.icon 🤖 -# @raycast.argument1 { "type": "text", "placeholder": "Placeholder" } +# @raycast.argument1 { "type": "text", "placeholder": "Text to count" } # Documentation: # @raycast.description counts chars in selected text # @raycast.author DannyDannyDanny # @raycast.authorURL https://raycast.com/DannyDannyDanny -echo -n "$1" | wc -c +printf '%s' "${1:-}" | wc -c | awk '{ print $1 }'