This file contains hidden or 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
{ | |
meta = { | |
description = "GNU Bourne-Again Shell, the de facto standard shell on Linux"; | |
homepage = "http://www.gnu.org/software/bash/"; | |
license = "GPLv3+"; | |
longDescription = "Bash is the shell, or command language interpreter, that will\nappear in the GNU operating system. Bash is an sh-compatible\nshell that incorporates useful features from the Korn shell\n(ksh) and C shell (csh). It is intended to conform to the IEEE\nPOSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers\nfunctional improvements over sh for both programming and\ninteractive use. In addition, most sh scripts can be run by\nBash without modification.\n"; | |
maintainers = ["Peter Simons <[email protected]>"]; | |
position = "/home/matej/workarea/nixpkgs/pkgs/shells/bash/default.nix:62"; | |
priority = "10"; | |
}; |
This file contains hidden or 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 | |
MYCOMMAND='while [ true ]; do sleep 1; echo "beje"; done' | |
# This will take down the whole process tree on ctrl+c | |
trap "exit" INT TERM | |
trap "kill 0" EXIT | |
while true; do | |
sleep 1; |
This file contains hidden or 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 ? import /home/matej/workarea/nixpkgs {} }: | |
let | |
# When upgrading node.nix / node packages: | |
# fetch package.json from package's repository | |
# run `npm2nix package.json node.nix` | |
# and replace node.nix with new one | |
nodePackages = import /home/matej/workarea/nixpkgs/pkgs/top-level/node-packages.nix { | |
inherit pkgs; | |
inherit (pkgs) stdenv nodejs fetchurl fetchgit; |
This file contains hidden or 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
<StreamWriter(gpgi-output(--detach-sign --armor), started daemon 139644666103552)>(gpgi-output(--detach-sign --armor)/write): 10 bytes left | |
Traceback (most recent call last): | |
File "/nix/store/xiwsgb5va80dbswcvqmx13992kmj7di9-python2.7-mailpile-0.4.0/lib/python2.7/site-packages/mailpile/crypto/gpgi.py", line 365, in writeout | |
fd.write(line) | |
IOError: [Errno 32] Broken pipe |
This file contains hidden or 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
nix-env -iA yesod -f packages.nix |
This file contains hidden or 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
# run it as: nix-instantiate packages.nix --eval --strict --show-trace | |
let | |
# set allowBroken and allowUnfree to true, so that we minimize error output later on | |
pkgs = import <nixpkgs> { config = { allowBroken = true; allowUnfree = true; }; }; | |
# catch exceptions on isDerivation function | |
tryDrv = a: builtins.tryEval (pkgs.lib.isDerivation a); | |
isDerivation = a: let t = tryDrv a; in t.success && t.value == true; |
This file contains hidden or 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, lib, pkgs, ... }: | |
with lib; | |
let | |
cfg = config.services.wal; | |
servers = { | |
nginx = import ./nginx.nix; | |
}; |
This file contains hidden or 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
acpid.enable = true; | |
acpid.lidEventCommands = '' | |
if [ ! -f /tmp/suspend.lock ]; then | |
touch /tmp/suspend.lock; | |
/run/current-system/sw/bin/systemctl suspend; | |
else | |
rm /tmp/suspend.lock; | |
fi | |
''; |
This file contains hidden or 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
systemd.services."my-post-suspend" = | |
{ description = "Post-Suspend Actions"; | |
wantedBy = [ "suspend.target" ]; | |
after = [ "post-sleep.service" ]; | |
script = | |
'' | |
sleep 3 && systemctl restart docker | |
''; | |
serviceConfig.Type = "simple"; | |
}; |
This file contains hidden or 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, config, lib }: | |
let | |
somescript = pkgs.writeScriptBin "somescript.sh" '' | |
#!${pkgs.stdenv.shell} | |
some shell commands ... | |
''; | |
in { |