Skip to content

Instantly share code, notes, and snippets.

joachim@lenovo-t530 ~/Desktop/projects/nixos/nixos (git)-[master] % solid-hardware details /org/freedesktop/UPower/devices/battery_BAT0
udi = '/org/freedesktop/UPower/devices/battery_BAT0'
parent = '/org/freedesktop/UPower' (string)
vendor = 'LGC' (string)
product = '45N1011' (string)
description = 'Lithium Ion Battery' (string)
Battery.plugged = true (bool)
Battery.type = 'PrimaryBattery' (0x3) (enum)
Battery.chargePercent = 100 (0x64) (int)
Battery.rechargeable = true (bool)
=======================================================================
ldd smokegen
=======================================================================
joachim@lenovo-t530 ~/Desktop/projects/nixos/nixpkgs (git)-[master] % ldd =smokegen
linux-vdso.so.1 (0x00007fffe6bff000)
libQtCore.so.4 => not found
libQtXml.so.4 => not found
libcppparser.so => not found
networking = {
hostName = "nix9000"; # Define your hostname.
wireless.enable = false; # Enables Wireless.
bridges = {
br0 = {
interfaces = [ "enp4s0" ];
};
};
firewall = {
enable = true;
=== works with 18 branches ===
============ nested reply begin =============
Expires: Fri, 01 Jan 1980 00:00:00 GMT^M
Pragma: no-cache^M
Cache-Control: no-cache, max-age=0, must-revalidate^M
Content-Type: application/x-git-receive-pack-advertisement^M
^M
001f# service=git-receive-pack
000000b21485e317277bb191588eb1f4ab8bba1ccd36ac63 refs/heads/MWQyNjZmYjEwZDY5YmVlZWQ0NjUwZDk3ZTQxODM4ODFiOGZhY2Q4MmY1MWY2ZGNi^@ report-status delete-refs side-band-64k quiet ofs-delta
0079cec18a59b8917802ff306adcb4032a920d19e757 refs/heads/N2ZmNDljMmM1YTJlOTg4YzZlMDJhNDJkYjQ0Y2EwMmI1Y2FjODE0NTRjOTdmNGNl
Nov 16 15:30:15 lenovo-t530 systemd-journal[1451]: Missed 7 kernel messages
Nov 16 15:30:15 lenovo-t530 kernel: mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
Nov 16 15:30:15 lenovo-t530 systemd-journal[1451]: Missed 13 kernel messages
Nov 16 15:30:15 lenovo-t530 kernel: mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
Nov 16 15:30:15 lenovo-t530 systemd-journal[1451]: Missed 13 kernel messages
Nov 16 15:30:15 lenovo-t530 kernel: mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
Nov 16 15:30:15 lenovo-t530 systemd-journal[1451]: Missed 13 kernel messages
Nov 16 15:30:15 lenovo-t530 kernel: mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
Nov 16 15:30:15 lenovo-t530 systemd[1]: Stopping Journal Service...
Nov 16 15:30:15 lenovo-t530 systemd-journal[1451]: Journal stopped
my $curl = WWW::Curl::Easy->new;
#system("$Nix::Config::curl --fail --location --insecure --connect-timeout $curlConnectTimeout '$url' $decompressor | $Nix::Config::binDir/nix-store --restore $destPath");
#$curl->setopt(CURLOPT_HEADER, 1);
#$curl->setopt(CURLOPT_URL, 'https://raw.githubusercontent.com/qknight/nix-build-hack/master/www_curl_easy.pl');
$curl->setopt(CURLOPT_URL, $url);
$curl->setopt(CURLOPT_NOPROGRESS, 0);
$curl->setopt(CURLOPT_FAILONERROR, 0);
$curl->setopt(CURLOPT_FOLLOWLOCATION, 1);
$curl->setopt(CURLOPT_SSL_VERIFYHOST, 0);
@qknight
qknight / gist:e7426ae8fe71371bd1f9
Created June 25, 2014 08:48
npm2nix creates broken node-packages.nix
npm2nix pkgs/top-level/node-packages.json pkgs/top-level/node-packages.nix
nodePackages = recurseIntoAttrs (import ./node-packages.nix {
inherit pkgs stdenv nodejs fetchurl fetchgit;
neededNatives = [python] ++ lib.optional (lib.elem system lib.platforms.linux) utillinux;
self = pkgs.nodePackages;
});
**************************
Prosody was unable to find luaexpat
This package can be obtained in the following ways:
Source: http://www.keplerproject.org/luaexpat/
Debian/Ubuntu: sudo apt-get install liblua5.1-expat0
luarocks: luarocks install luaexpat
luaexpat is required for Prosody to run, so we will now exit.
More help can be found on our website, at http://prosody.im/doc/depends
joachim@lenovo-t530 /tmp % cat /tmp/prosody
#! /nix/store/ihmkc7z2wqk3bbipfnlh0yjrlfkkgnv6-bash-4.2-p45/bin/bash -e
export LUA_PATH="/nix/store/l2ngkvqc0svjdbh79r9ywygz2bkr5y98-lua-sockets-2.0.2/share/lua/5.1/?.lua;/nix/store/l2ngkvqc0svjdbh79r9ywygz2bkr5y98-lua-sockets-2.0.2/share/lua/5.1/socket/?.lua"
export LUA_CPATH="/nix/store/l2ngkvqc0svjdbh79r9ywygz2bkr5y98-lua-sockets-2.0.2/lib/lua/5.1/socket/?.so;/nix/store/l2ngkvqc0svjdbh79r9ywygz2bkr5y98-lua-sockets-2.0.2/lib/lua/5.1/mime/?.so"
exec /tmp/lua.sh "${extraFlagsArray[@]}" "$@"
joachim@lenovo-t530 /tmp % cat /tmp/lua.sh
#!/nix/store/bsmh8144crlw63zmqyig3yh5hk83pcyd-lua-5.1.5/bin/lua
print(package.path);
@qknight
qknight / gist:bc77d9d984053c8db753
Last active August 29, 2015 14:05
pdfgrep: nix expression and poppler_data issue
{ fetchurl, stdenv, pkgconfig, poppler, poppler_data }:
stdenv.mkDerivation rec {
name = "pdfgrep-${version}";
version = "1.3.1";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/pdfgrep/${version}/${name}.tar.gz";
sha256 = "6e8bcaf8b219e1ad733c97257a97286a94124694958c27506b2ea7fc8e532437";
};