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 bash | |
set -e | |
fluxlib bash | |
# this builds configuration files from templates | |
# it takes a template for a nix expression and replaces | |
# certain variables with values stored in some files. | |
function maketemp |
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
{ pkgs, stdenv}: | |
let | |
version = "0.0.1"; | |
in stdenv.mkDerivation | |
{ | |
name = "script-${version}"; |
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
{ pkgs, stdenv}: | |
# flux | |
# bin/ | |
# flux.sh | |
# lib/ | |
# subcom1 | |
# subcom2 | |
# ... | |
# flux.nix |
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 bash | |
set -e | |
# Main flux script | |
# Look for scripts in this directory | |
BINDIR="$(dirname "$0")" | |
LIBDIR="$(dirname ${BINDIR})/lib" | |
# Execute commands |
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
$ sudo nixos-rebuild switch --show-trace | |
building Nix... | |
building the system configuration... | |
trace: { rev = "5277d96745afcc04a0873102f4a5f80cfc68fa23"; sha256 = "17h2ijb50q76al72hpggv35bbqiayyzvybmfwyx1cr5xzlpvzcqh"; url = "https://github.com/teozkr/Sbtix"; } | |
error: while evaluating the attribute ‘buildCommand’ of the derivation ‘nixos-system-meso-17.03.1160.f2c4af4e3b’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpk | |
gs/nixos/modules/system/activation/top-level.nix:107:7: | |
while evaluating the attribute ‘sources’ of the derivation ‘etc’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/etc/etc.nix:12:5: | |
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/etc/etc.nix:20:20, called from undefined position: | |
while evaluating the attribute ‘source’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:199:44: | |
while evaluating anonymous function at /nix/var/nix/profiles/per-user/r |
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
error: while evaluating the attribute ‘buildCommand’ of the derivation ‘nixos-system-meso-17.03.1395.9b948ea439’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpk | |
gs/nixos/modules/system/activation/top-level.nix:107:7: | |
while evaluating the attribute ‘sources’ of the derivation ‘etc’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/etc/etc.nix:12:5: | |
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/etc/etc.nix:20:20, called from undefined position: | |
while evaluating the attribute ‘source’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:199:44: | |
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:75:45, called from /nix/var/nix/profiles/per-user/root/cha | |
nnels/nixos/nixpkgs/lib/attrsets.nix:199:52: | |
while evaluating the attribute ‘value’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.n |
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
{ config, pkgs, ... }: | |
{ | |
nixpkgs.config = | |
{ | |
# Allow proprietary packages | |
allowUnfree = true; |
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
these derivations will be built: | |
/nix/store/gs7vy9gd6cdm14jyzkk5zvi7a99g5p05-python3.6-jupyterhub-0.8.1.drv | |
building path(s) ‘/nix/store/llfk8qxk218gya1awili8akrdj3gfcjc-python3.6-jupyterhub-0.8.1’ | |
unpacking sources | |
unpacking source archive /nix/store/16c26vhfd7wni4qzmzp6vsxkr17k90pz-jupyterhub-0.8.1.tar.gz | |
source root is jupyterhub-0.8.1 | |
setting SOURCE_DATE_EPOCH to timestamp 1510058379 of file jupyterhub-0.8.1/PKG-INFO | |
patching sources | |
configuring | |
building |
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
{ pkgs, myFunc, ... }: | |
myFunc { | |
x = path.to.stuff; | |
} |
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
# Define user accounts | |
users.extraUsers = | |
{ | |
bob = | |
{ | |
home = "/home/bob"; | |
extraGroups = [ "wheel" "networkmanager" ]; | |
isNormalUser = true; | |
uid = 1000; | |
}; |
OlderNewer