- Improve the autodidactic Nix onboarding experience to increase community growth
- Provide a clear learning path from first impression down to source code
This file contains 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
#! /usr/bin/bash | |
# install NixOS over Debian 10, following and simplifying | |
# <https://nixos.org/nixos/manual/#sec-installing-from-other-distro> | |
# PREPARATION: set up /etc/nixos/configuration.nix with authorized SSH keys | |
set -e -o pipefail | |
network_config() { | |
# capture networking configuration from current machine. |
This file contains 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/bash | |
# get network configuration for from /proc/net | |
# original: <https://stackoverflow.com/a/14725655/5147619> | |
# WARNING: works only for first adapter listed and only for IP4 | |
# NOTE: ip functions set variables instead of returning to STDOUT | |
hex_to_int() { |
This file contains 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
#!/usr/bin/env nix-shell | |
#!nix-shell -i fish -p gh -I nixpkgs=channel:nixos-22.05 | |
argparse --min-args 2 "h/help" "a/arg=+" -- $argv | |
or begin echo " | |
specify query and interval, for example: | |
pr 1 week | |
issue 3 days |
This file contains 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
with builtins; | |
{ | |
every = n: xs: | |
# take every `n`-th element from the list `xs` | |
if n < 2 then xs else | |
if xs == [] then [] else | |
if length (tail xs) < n - 1 then [ (head xs) ] else | |
[ (head xs) ] ++ every (apply-n-times tail xs n) n | |
; |
flowchart
direction LR
subgraph Nix
subgraph Bazel
source
BUILD.bazel
WORKSPACE
end
bzl[Bazel] & tools & libraries --> Bazel
+-----------------------------------------------------+
| data flow programming |
| .-------. .----------. .--------. |
| | input | ---> | function | ---> | output | |
| '-------' '----------' '--------' |
| ^ | |
+---------|--------------------------------|----------+
| V
+-------------------------------------+
Here's how to use Home Manager without home-manager
.
@proofconstruction is my witness.
First of all we have to make sure that the version of Home Manager matches the Nixpkgs release we want to use for our user environment configuration. Otherwise we will almost certainly get into trouble with mismatching interfaces.
We start out with a function that takes Nixpkgs as pkgs
and fetch the appropriate Home Manager release.
We get the given Nixpkgs version string from pkgs.lib.version
and split it into the .
format with lib.versions.majorMinor
.
gh pr list --state merged --search "NOT Backport merged:2023-04-01..2024-01-08" --json number,title --jq '.[] | "- [#\( .number )](https://github.com/NixOS/nix/pull/\( .number )) \( .title )"' --limit 1000 | sort
for label in bug tests documentation UX error-messages performance contributor-experience build-problem new-cli installer language process feature; do echo -e "\n## [$label](https://github.com/NixOS/nix/issues?q=is%3Amerged+label%3A$label+merged%3A2023-03-31..2024-01-08+)\n"; gh pr list --state merged --label "$label" --search "NOT Backport merged:2023-04-01..2024-01-08" --json number,title --jq '.[] | "- [#\( .number )](https://github.com/NixOS/nix/pull/\( .number )) \( .title )"' --limit 500 | sort