Skip to content

Instantly share code, notes, and snippets.

View orzklv's full-sized avatar
🏴
For me, open source is a moral thing.

Orzklv orzklv

🏴
For me, open source is a moral thing.
View GitHub Profile
@orzklv
orzklv / create-installer.sh
Created November 8, 2025 11:52
Fetch and create latest MacOS Installer
# Source: https://unboundplanet.com/nova/the-cleanest-macos-tahoe-macos-26-mac-hackintosh-vm/
# List all avialable installers
softwareupdate --list-full-installers
# Fetch the latest installer
softwareupdate --fetch-full-installer --full-installer-version 26.0.1
# Check if installer has been fetched
ls -lh /Applications | grep -i "tahoe"
@orzklv
orzklv / runner-module.nix
Last active September 30, 2025 23:20
Module to generate runners from a single list.
{
lib,
config,
pkgs,
...
}: let
cfg = config.kolyma.runners;
user = {
users.users.${cfg.user} = {
@orzklv
orzklv / app.nix
Created September 28, 2025 18:32
Generate nix module config out of list
{
lib,
config,
inputs,
...
}: let
cfg = config.kolyma.www;
bnest = mod: lib.strings.splitString "." mod;
@orzklv
orzklv / package.nix
Last active October 2, 2025 06:39
E-IMZO manager early nix adoption package
{
stdenv,
lib,
libiconv,
fetchFromGitHub,
gcc,
llvmPackages,
appstream,
appstream-glib,
cargo,
@orzklv
orzklv / good-example.hs
Created March 28, 2025 18:10
Java devs, get the rope!
-- Algebraic data type definition
data Tree a = Empty | Node (Tree a) a (Tree a) deriving (Show)
-- Insertion function
insert :: (Ord a) => a -> Tree a -> Tree a
insert x Empty = Node Empty x Empty
insert x (Node left v right)
| x < v = Node (insert x left) v right
| otherwise = Node left v (insert x right)
{
lib,
stdenv,
jre8,
curl,
ccid,
fetchurl,
pcsclite,
pcsc-tools,
writeShellScript,
{
homeConfigurations = {
# ___ __
# / | ____ ____ / /__
# / /| | / __ \/ __ \/ / _ \
# / ___ |/ /_/ / /_/ / / __/
# /_/ |_/ .___/ .___/_/\___/
# /_/ /_/
# For all my current OSX machines
"sakhib@apple" = home-manager.lib.homeManagerConfiguration {
@orzklv
orzklv / before-flake.nix
Created August 15, 2024 15:56
My life before flake-utils.lib.eachDefaultSystem was:
...
let
lib = nixpkgs.lib;
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
@orzklv
orzklv / readme.md
Last active October 4, 2025 20:10
How to migrate from homebrew to Nix package manager by Orzklv! Moved to: https://nix-darwin.uz/guide/

How to migrate from Homebrew to Nix

#homebrew #brew #nix #nixos

I'll be honest with ya'll, you don't wanna get away from Homebrew completely, yes, I'll explain!

I've been using Nix package manager in all my MacOS machines about 3-4 months and I always kept Homebrew installed. You see, Nix is a very good package manager and with its home-manager, it becomes a good config farm as well. However, installing & managing GUI & unfree apps via Nix has been a quite painful experience for me. Sometimes, it wouldn't run properly, crash or wouldn't even start. Also, Nix doesn't have most of GUI packages that Homebrew has. Therefore, I keep homebrew and use it only for its "casks" registry to install GUI & unfree apps whereas having nix to manage dot file configurations and cli apps.

@orzklv
orzklv / linkedshit.rs
Created March 14, 2024 14:37
Linked List implementation on Rust
use std::mem;
pub struct List<T> {
head: Link<T>,
}
type Link<T> = Option<Box<Node<T>>>;
struct Node<T> {
elem: T,