This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, modulesPath, ... }: | |
{ | |
imports = [ "${modulesPath}/virtualisation/qemu-vm.nix" ]; | |
disko.devices.disk.disk1.device = lib.mkForce "/dev/vda"; | |
services.openssh.settings.PermitRootLogin = "yes"; | |
services.openssh.settings.PermitEmptyPasswords = "yes"; | |
services.openssh.settings.PasswordAuthentication = lib.mkForce true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nix run nixpkgs#dua -- --count-hard-links --apparent-size /nix/store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -f __foo && sops set ./host-secrets.yaml '["node2_ssh_key"]' "$(cat __foo | tr -d '\n' | jq -R '@json')" && | |
cat __foo.pub && rm __foo* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zfs create -o encryption=on -o keyformat=passphrase -o keylocation=file:///path/to/secret pool/dataset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find "$dir" 2>/dev/null | while read -r item; do | |
# Get all stats at once for each item | |
stats=$(stat --format "%F|%a|%u|%g" "$item" 2>/dev/null) | |
# Parse the stats | |
IFS='|' read -r type perms owner group <<< "$stats" | |
# Set expected values based on whether it's a directory or file | |
if [ "$type" = "directory" ]; then | |
expected_perms="700" | |
item_type="Directory" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
webhook_url="https://discord.com/api/webhooks/your-webhook-url-here" | |
cursor_file="/var/lib/systemd-monitor/journal_cursor" | |
# Use journalctl cursor for more atomic and reliable tracking | |
if [ -f "$cursor_file" ]; then | |
journal_args="--cursor-file=$cursor_file" | |
else | |
# First run - check last 5 min then save cursor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
checkDuplicateScenario = pkgs.runCommand "checkDuplicateScenario" | |
{ env.HISTORIES = "${snapshot-scenarioHistories}/test/scenario-histories"; } '' | |
scenarioDirFiles=$(ls "$HISTORIES") | |
checked="" | |
for scenario1 in $scenarioDirFiles; do | |
for scenario2 in $scenarioDirFiles; do | |
if [ "$scenario1" = "$scenario2" ]; then | |
continue | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
programs.mpv.enable = true; | |
programs.mpv.bindings.j = "seek -5"; | |
programs.mpv.bindings.l = "seek 5"; | |
programs.mpv.bindings.k = "cycle pause"; | |
programs.mpv.bindings.UP = "add volume 5"; | |
programs.mpv.bindings.DOWN = "add volume -5"; | |
programs.mpv.bindings.">" = "multiply speed 1.1"; | |
programs.mpv.bindings."<" = "multiply speed 1/1.1"; | |
programs.mpv.bindings.c = "cycle sub"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lsp_langs = { "ts_ls", "biome", "nixd" } | |
local direnv_lspstart_group = vim.api.nvim_create_augroup("StartLspAfterDirenv", { clear = true }) | |
vim.api.nvim_create_autocmd("BufEnter", { | |
group = vim.api.nvim_create_augroup("StartLsp", { clear = true }), | |
pattern = "*", | |
callback = function() | |
local result = vim.system( | |
{ "git", "-C", vim.fn.expand("%:p:h"), "rev-parse", "--show-toplevel" }, | |
{ text = true } | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
programs.qutebrowser.settings.colors.completion.fg = "#ddc7a1"; | |
programs.qutebrowser.settings.colors.completion.odd.bg = "#282828"; | |
programs.qutebrowser.settings.colors.completion.even.bg = "#1d2021"; | |
programs.qutebrowser.settings.colors.completion.category.fg = "#e78a4e"; | |
programs.qutebrowser.settings.colors.completion.category.bg = "#1d2021"; | |
programs.qutebrowser.settings.colors.completion.category.border.top = "#1d2021"; | |
programs.qutebrowser.settings.colors.completion.category.border.bottom = "#1d2021"; | |
programs.qutebrowser.settings.colors.completion.item.selected.fg = "#ddc7a1"; | |
programs.qutebrowser.settings.colors.completion.item.selected.bg = "#32361a"; |
NewerOlder