https://github.com/typovrak/nixos-screenkey
⌨️ Declarative NixOS module to install and configure Screenkey for per-user keystroke visualization with secure settings
https://github.com/typovrak/nixos-screenkey
automation declarative keyboard keystroke-visualization nix nixos screenkey
Last synced: 11 months ago
JSON representation
⌨️ Declarative NixOS module to install and configure Screenkey for per-user keystroke visualization with secure settings
- Host: GitHub
- URL: https://github.com/typovrak/nixos-screenkey
- Owner: typovrak
- License: mit
- Created: 2025-04-10T20:17:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-02T18:10:17.000Z (12 months ago)
- Last Synced: 2025-08-06T01:24:25.048Z (11 months ago)
- Topics: automation, declarative, keyboard, keystroke-visualization, nix, nixos, screenkey
- Language: Nix
- Homepage: https://typovrak.tv/nixos
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
[](https://nixos.org/)
[](LICENSE.md)
[](https://typovrak.tv/coffee)
[](https://typovrak.tv/nixos)
[](https://typovrak.tv/discord)
# ⌨️ NixOS Screenkey
> Declarative NixOS module to install and configure Screenkey, a keystroke visualization, with secure per-user settings.
## 🧩 Part of the Typovrak NixOS ecosystem
This module is part of ```Typovrak NixOS```, a fully modular and declarative operating system configuration built entirely with :
- 🧱 **30+ standalone modules :** Each managing a specific tool, feature or aesthetic like ```zsh```, ```i3```, ```lighdm```, ```polybar```, ```gtk``` and more.
- 🎨 **Catppuccin Mocha :** The default theme across terminal, GUI, and login interfaces.
- 🛡️ **100% FOSS compliant :** No proprietary software included unless explicitly chosen.
- 🧑💻 **Built for developers :** Optimized for speed, keyboard-centric workflows and expressive CLI tooling.
*Explore the full system : 👉 [github.com/typovrak/nixos](https://github.com/typovrak/nixos)*
> [!CAUTION]
> This module is opinionated, it may **override**, **replace**, or **remove** files and settings **without** prompt. To avoid unexpected changes, **back up** your existing files or **fork** this module to take full control. **Follow this documentation** to avoid any of this problem.
## 📦 Features
- 🔒 **Secure config directory :** Creates ```~/.config/screenkey``` with ```700``` permissions and correct ownership.
- ⚙️ **Customizable settings :** Deploys your ```screenkey.json``` into the user’s config folder with ```600``` permissions.
- 📦 **Package management :** Installs ```screenkey``` via ```environment.systemPackages```.
- 🔄 **Idempotent :** Cleans and reconfigures on every rebuild to maintain consistent state.
- ✨ **Zero-friction :** Works out-of-the-box, no manual setup required beyond import.
- 💾 **Backup guidance :** Documentation includes commands to back up existing config before changes.
## 📂 Repository structure
```bash
❯ tree -a -I ".git*"
.
├── configuration.nix # module configuration
├── LICENSE.md # MIT licen
├── README.md # this documentation
└── screenkey.json # screenkey configuration
1 directory, 4 files
```
## ⚙️ Prerequisites
### 1. NixOS version
Requires NixOS 24.11 or newer.
### 2. User validation
the target user must be defined in ```config.username```. See [typovrak main nixos configuration](https://github.com/typovrak/nixos) for more details.
### 3. Backup
Before proceeding, back up existing configuration if needed
```bash
cp ~/.config/screenkey.json{,.bak}
```
## ⬇️ Installation
### 🚀 Method 1 : Out-of-the-box
Fetch the module directly in your [main nixos configuration](https://github.com/typovrak/nixos) at ```/etc/nixos/configuration.nix``` using fetchGit
```nix
# /etc/nixos/configuration.nix
let
nixos-screenkey = fetchGit {
url = "https://github.com/typovrak/nixos-screenkey.git";
ref = "main";
rev = "744197b2e31c2d6a0e1885cf87930e73f1b6ded1"; # update to the desired commit
};
in
{
imports = [
/etc/nixos/hardware-configuration.nix # system hardware settings
/etc/nixos/variables.nix # defines config.username and other variables, see https://github.com/typovrak/nixos for more details
(import "${nixos-screenkey}/configuration.nix")
];
}
```
Once imported, rebuild your system to apply changes
```bash
sudo nixos-rebuild switch
```
### 🍴 Method 2 : Fork
Want to **personalize** this module ?
Fork it and add this custom module in your [main nixos configuration](https://github.com/typovrak/nixos) at ```/etc/nixos/configuration.nix``` using fetchGit
```nix
let
nixos-screenkey = fetchGit {
url = "https://github.com//nixos-screenkey.git";
ref = "main";
rev = ""; # see below
};
in {
imports = [
/etc/nixos/hardware-configuration.nix # system hardware settings
/etc/nixos/variables.nix # defines config.username and other variables, see https://github.com/typovrak/nixos for more details
(import "${nixos-screenkey}/configuration.nix")
];
}
```
Get the latest commit hash by executing
```bash
git clone https://github.com//nixos-screenkey.git &&
cd nixos-screenkey &&
git log -1 --pretty=format:"%H"
```
## 🎬 Usage
Launch ```screenkey``` in a terminal or with the dmenu in i3.
## 📚 Learn more
- 🧠 [Screenkey GitHub repository](https://github.com/wavexx/screenkey) : Official source, latest code updates, and usage instructions.
- 📦 [Screenkey on NixOS](https://search.nixos.org/packages?channel=unstable&show=screenkey&from=0&size=50&sort=relevance&query=screenkey) : Nix package details including version and available options.
## 🌐 Discover my NixOS system portal
Dive into [typovrak.tv/nixos](https://typovrak.tv/nixos) Catppuccin mocha green themed **gateway** to my GitHub and NixOS setup.
Browse **every module**, example and config in a sleek with an interactive interface that feels just like your desktop.
## ❤️ Support
If this module saved you time, please ⭐️ the repo and share feedback.
You can also support me on ☕ [Buy me a coffee](https://typovrak.tv/coffee)
## 💬 Join the Typovrak community on Discord 🇫🇷
If you've ever ```rm -rf```ed your config by mistake or rebuilt for the 42nd time because a semicolon was missing…
You're not alone, **Welcome home !**
🎯 [Join us on Discord »](https://typovrak.tv/discord)
🧭 What you’ll find is :
- ```💻 #nixos-setup``` - get help with modules, rebuilds and configs.
- ```🌐 #web-dev``` - talk JS, TypeScript, React, Node and more.
- ```🧠 #open-source``` - share your repos, contribute to others and discuss FOSS culture.
- ```⌨️ #typing``` - layouts, mechanical keyboards and speed goals.
- ```🎨 #ricing``` - dotfiles, theming tips and desktop screenshots.
*Everyone's welcome no matter how many times you've broken your system ~~(except for Windows users)~~ 😄*
---
Made with 💜 by typovrak