Code Monkey home page Code Monkey logo

nix.university's Introduction

nix.university

  1. Click here to start a Codespace on nix.university/main
  2. Open a Terminal ( Ctrl + Backtick ) and pick a path below.

nix repl

  • Type nix repl
  • Hit [Enter]
  • (Optionally, type university = import ./university.nix then hit [Enter] again)

nix-shell

  • Type nix-shell
  • Hit [Enter] (This loads shell.nix, which provides Emacs)

Important

If the above steps do not work as expected, then please reach out!

Note: including Nix language extensions in .devcontainer.json crashes the build, so they need to be installed afterward.

nix.university's People

Contributors

preston-johnson avatar

Stargazers

 avatar matt wilkie avatar Scott Edlund avatar Earl Chase avatar Sherif Abdalla avatar  avatar dzmitry-lahoda avatar Benjamin LeBrun avatar Jason R. McNeil avatar Pierrot avatar  avatar Adrian avatar

Watchers

Adrian avatar  avatar

Forkers

drunkod

nix.university's Issues

nix in action (interactively in codespace)

Nix for coders

  • nix as json
  • getting json in and out (merge jsons and share props)
  • getting simple js package
  • bashing bash in nix
  • nix as template engine form html
  • deno/bun shell script in js via
  • building binary from js manually via mkPackage

Interactive nix

  • repl
  • instantiate
  • shell

Computer Science nix

  • substitution
  • lazyness for mere mortals
  • override for mere mortals
  • fixed point for mere mortals
  • overlays for mere mortals
  • modules(for dynamic extensibility) for mere mortals
  • instantiate AGAIN
  • nix type system (from modules)

Industrial nix

  • flakes
  • flake-parts
  • ci devour
  • nix over ssh (nixbuild)
  • OCI image linux
  • QUEM vm linux, default base
  • cloud nix (terraform sandwich) , default image

Nix internals

Nix for hardware and OS

  • QEMU storage formatter example

  • how to setup graphics card in NIX

  • how to run local LLM GPT AI

can do variants for cloud/mac/nixos linux with gpu, so people can pick GPU they have

Referrences:

https://nixos.org/guides/nix-pills/nixpkgs-overriding-packages.html

https://medium.com/@MrJamesFisher/nix-by-example-a0063a1a4c55

https://tech.ingolf-wagner.de/nixos/nix-instantiate/

https://jonascarpay.com/posts/2022-09-19-declarative-deployment.html

not work with root

I try this:

{
  description = "Delta Chat for Android";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    rust-overlay.url = "github:oxalica/rust-overlay";
    flake-utils.url = "github:numtide/flake-utils";
    android.url = "github:tadfisher/android-nixpkgs";
  };

  outputs = { self, nixpkgs, rust-overlay, flake-utils, android }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        overlays = [ (import rust-overlay) ];
        pkgs = import nixpkgs { inherit system overlays; };
        android-sdk = android.sdk.${system} (sdkPkgs:
          with sdkPkgs; [
            build-tools-30-0-3
            cmdline-tools-latest
            ndk-bundle
            platform-tools
            platforms-android-33
            ndk-23-2-8568313
          ]);
      in {
        devShells.default = pkgs.mkShell {
          ANDROID_SDK_ROOT = "${android-sdk}/share/android-sdk";
          ANDROID_NDK_ROOT =
            "${android-sdk}/share/android-sdk/ndk/23.2.8568313";
	  shellHook = ''
            export PATH="$ANDROID_SDK_ROOT/build-tools/30.0.3/:$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/:$PATH"
	  '';
          buildInputs = [
            android-sdk
            pkgs.openjdk17
            (pkgs.buildPackages.rust-bin.stable."1.72.0".minimal.override {
              targets = [
                "armv7-linux-androideabi"
                "aarch64-linux-android"
                "i686-linux-android"
                "x86_64-linux-android"
              ];
            })
          ];
        };
      });
}

I get the error every time and I have tried this hack:
from:
NixOS/nix#6680 (comment)

Error: "suspicious ownership or permission on"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.