-
To provide Nix repositories with an easy and standard way to reference other Nix repositories.
-
To allow such references to be queried and updated automatically.
-
To provide a replacement for
nix-channel
,NIX_PATH
and Hydra
let | |
devices = [ | |
{ device = "10de:1c82"; slot = "42:00.0"; } # GPU | |
{ device = "10de:0fb9"; slot = "42:00.1"; } # GPU audio controller | |
# USB controllers | |
{ device = "1022:43ba"; slot = "01:00.0"; } | |
{ device = "1022:145c"; slot = "08:00.3"; } | |
{ device = "1022:145c"; slot = "43:00.3"; } | |
]; | |
in { |
This document contains some ideas for additions to the Nix language.
The Nix package manager, Nixpkgs and NixOS currently have several problems:
- Poor discoverability of package options. Package functions have
function arguments like
enableFoo
, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to
-
nix-channel
and~/.nix-defexpr
are gone. We'll use$NIX_PATH
(or user environment specific overrides configured vianix set-path
) to look up packages. Since$NIX_PATH
supports URLs nowadays, this removes the need for channels: you can just set$NIX_PATH
to e.g.https://nixos.org/channels/nixos-15.09/nixexprs.tar.xz
and stay up to date automatically. -
By default, packages are selected by attribute name, rather than the
name
attribute. Thusnix install hello
is basically equivalent tonix-env -iA hello
. The attribute name is recorded in the user environment manifest and used in upgrades. Thus (at least by default)hello
won't be upgraded tohelloVariant
.@vcunat suggested making this an arbitrary Nix expression rather than an attrpath, e.g.
firefox.override { enableFoo = true; }
. However, such an expression would not have a key in the user environment, unlike an attrpath. Better to require an explicit flag for this.
TBD: How to deal with search path clashes.
{ | |
"acKind": "ImageManifest", | |
"acVersion": "0.7.0", | |
"name": "my-app", | |
"labels": [ | |
{"name": "os", "value": "linux"}, | |
{"name": "arch", "value": "amd64"} | |
], | |
"app": { | |
"exec": [ |
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
# QEMU Monitor Protocol Python class | |
# | |
# Copyright (C) 2009 Red Hat Inc. | |
# | |
# This work is licensed under the terms of the GNU GPL, version 2. See | |
# the COPYING file in the top-level directory. | |
import socket, json, time, commands | |
from optparse import OptionParser |
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect | |
# jeroen@massar.ch - http://jeroen.massar.ch | |
server { | |
listen 192.0.1.1:80; | |
listen [2001:db8::1]:80; | |
# Redirect all non-HTTPS traffic to the HTTPS variant | |
return 301 https://$host$request_uri; | |
} |