Skip to content

Instantly share code, notes, and snippets.

@jakehamilton
Last active January 24, 2025 17:29
Show Gist options
  • Select an option

  • Save jakehamilton/6d5c5e321603a6ac6900446fb8ff3893 to your computer and use it in GitHub Desktop.

Select an option

Save jakehamilton/6d5c5e321603a6ac6900446fb8ff3893 to your computer and use it in GitHub Desktop.
sample.redacted
let Types := import ./types.redacted;
\{ pkgs :: Packages; name :: Types.Name = "Default" } ->
let add := \a :: Number -> \b :: Number ->
let result := a + b;
result;
let greeting := "Hello, ${name}";
let shell := pkgs.mkShell {
packages = [
pkgs.hare,
pkgs.bun,
];
};
let destructured := \{ a :: Number; b :: Number = 1 } -> a + b;
let module := \{ pkgs; ... } :: NixosModuleArgs -> {
config = {
environment.systemPackages = @pkgs[
hare,
] ++ @pkgs.gnome[
nautilus,
];
};
};
{
add;
greeting;
shell;
destructured;
module;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment