Skip to content

Instantly share code, notes, and snippets.

@zarelit
zarelit / README.md
Created April 5, 2024 09:40
Simple example of a Deployment with an env based on the namespace
{ pkgs, ... }:
let
patchelfFixes = pkgs.patchelfUnstable.overrideAttrs (_finalAttrs: _previousAttrs: {
src = pkgs.fetchFromGitHub {
owner = "Patryk27";
repo = "patchelf";
rev = "527926dd9d7f1468aa12f56afe6dcc976941fedb";
sha256 = "sha256-3I089F2kgGMidR4hntxz5CKzZh5xoiUwUsUwLFUEXqE=";
};
});
@zarelit
zarelit / configuration.nix
Last active April 30, 2023 19:21
nix module "generator" with param
{ config, pkgs, ...}:
{
imports =
[
(import ./modules/testparam.nix { name = "beautifulname"; })
];
}
@zarelit
zarelit / flake.nix
Created April 29, 2023 10:31
load flake in repl
{
description = "A very basic flake";
inputs = {
nixgl.url = "github:guibou/nixGL";
nixpkgs.url = "nixpkgs/release-22.11";
};
outputs = { nixgl, nixpkgs, ... }:
let
glpkgs = import nixpkgs {
system = "x86_64-linux";
@zarelit
zarelit / README.md
Created March 28, 2022 11:44 — forked from peti/README.md
Make NixOS provide version-specific LOCALE_ARCHIVE environment variables

This NixOS code ensures that the system provide version-specific $LOCALE_ARCHIVE environment variables to mitigate the effects of NixOS/nixpkgs#38991.

To deploy it, copy the file into your /etc/nixos folder using a file name like multi-glibc-locale-paths.nix. Then edit your configuration.nix file to contain the attribute:

imports = [ ./multi-glibc-locale-paths.nix ];
@zarelit
zarelit / configuration.nix
Created December 8, 2021 16:15 — forked from bitonic/configuration.nix
NixOS configuration for a remote ZFS server on Hetzner
# Full NixOS configuration for a ZFS server with full disk encryption hosted on Hetzner.
# See <https://mazzo.li/posts/hetzner-zfs.html> for more information.
{ config, pkgs, ... }:
let
# Deployment-specific parameters -- you need to fill these in where the ... are
hostName = "...";
publicKey = "...";
# From `ls -lh /dev/disk/by-id`
@zarelit
zarelit / tw5-server.rb
Created June 7, 2020 16:34 — forked from jimfoltz/tw5-server.rb
A local server for TiddlyWiki5 that allows saving wiki.
require 'webrick'
require 'fileutils'
if ARGV.length != 0
root = ARGV.first.gsub('\\', '/')
else
root = '.'
end
BACKUP_DIR = 'bak'
@zarelit
zarelit / yardoc_cheatsheet.md
Created August 13, 2018 09:17 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

Keybase proof

I hereby claim:

  • I am zarelit on github.
  • I am zarelit (https://keybase.io/zarelit) on keybase.
  • I have a public key whose fingerprint is 416B FA1B D107 1E3C 49BF 5E9A 8C02 E514 694A E632

To claim this, I am signing this object:

@zarelit
zarelit / on-modify.blocks_attr.py
Created May 10, 2018 11:16 — forked from wbsch/on-modify.blocks_attr.py
Taskwarrior hook script that adds a "blocks:" pseudo-attribute for adding/modifying tasks.
#!/usr/bin/env python
#
# Adds the ability to add / modify tasks using a "blocks:" attribute,
# the opposite of "depends:".
#
# This script acts as an on-modify, on-add and on-launch hook at the same time.
#
### SETUP
# Save this file as
# ~/.task/hooks/on-modify.blocks_attr.py