Skip to content

Instantly share code, notes, and snippets.

@wtchrs
wtchrs / config__niri__config.kdl
Created August 13, 2025 08:10
niri configuration
input {
keyboard {
xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
// For example:
// layout "us,ru"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
options "ctrl:nocaps"
@wtchrs
wtchrs / c++-minimal-flake.nix
Created July 22, 2025 05:47
C++ Minimal Flake Setting
{
description = "C++ Minimal Flake Setting";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
@wtchrs
wtchrs / arch_linux_installation_guide.md
Created June 5, 2025 10:26 — forked from mjkstra/arch_linux_installation_guide.md
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
---
Language: Cpp
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignOperands: Align
AlignTrailingComments: false
AllowShortBlocksOnASingleLine: Empty

Vaultwarden Docker Compose Configuration

This gist is a docker compose configuration for Vaultwarden, which is an Bitwarden compatible server.

This configuration uses caddy for a reverse proxy. caddy will automatically configure TLS certificates using ACME HTTP-01 challenge.

Get started

@wtchrs
wtchrs / alacritty.toml
Created October 11, 2024 14:39
Alacritty Configuration with Nord Theme
[window]
opacity = 0.95
[window.dimensions]
columns = 120
lines = 32
[window.padding]
x = 6
y = 6
@wtchrs
wtchrs / !SHELL_DOTFILES_README.md
Last active May 30, 2025 12:59
Dotfiles for Shell Environment

Dotfiles for Bash, Zsh and Starship Prompt

To set up in Bash, download .bashrc and reload it:

curl -o ~/.bashrc https://gist.githubusercontent.com/wtchrs/8e087bc39a10b3ec9d1cc77b5a8d74df/raw/.bashrc
source ~/.bashrc

For Zsh, download .zshrc and reload it:

@wtchrs
wtchrs / starship.toml
Last active June 7, 2024 15:12
Starship Prompt Setting
"$schema" = 'https://starship.rs/config-schema.json'
continuation_prompt = "[ ](#62708a)"
format = """
[ ](bg:#445167)[ ](bg:#62708a)[ ](bg:#808eaf)\
$os$shell\
[](bg:#769ff0 fg:#a3aed2)\
$directory\
[](fg:#769ff0 bg:#394260)\
@wtchrs
wtchrs / pre-commit
Last active June 7, 2024 13:25
Git pre-commit hook for Rust cargo fmt
#!/bin/bash
if ! cargo fmt --check; then
echo >&2 ""
echo >&2 "Run \`cargo fmt\` before commit."
exit 1
fi
@wtchrs
wtchrs / winkey_to_powertoysrun.ahk
Last active April 9, 2024 15:02
Mapping Win key to PowerToys Run using AutoHotkey
;-----------------------------------------;
; Winkey PowerToys Run ;
;-----------------------------------------;
replaceStartMenu := true
LWin Up::
{
if (replaceStartMenu) {
if (A_PriorKey = "LWin") {