Skip to content

Instantly share code, notes, and snippets.

@matejc
matejc / ati drivers patch
Created June 27, 2013 15:53
patch from vcunat for the ATI drivers (NixOS)
diff --git a/pkgs/os-specific/linux/ati-drivers/builder.sh b/pkgs/os-specific/linux/ati-drivers/builder.sh
index abb7854..39d0f38 100644
--- a/pkgs/os-specific/linux/ati-drivers/builder.sh
+++ b/pkgs/os-specific/linux/ati-drivers/builder.sh
@@ -64,6 +64,14 @@ setModVersions(){
# make.sh contains much more code to determine this whether its enabled
}
+doPatchElf(){
+ for prog in $@ ; do
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "radeon-aruba-firmware";
srcs = [
(fetchurl { url = "http://people.freedesktop.org/~agd5f/radeon_ucode/ARUBA_me.bin"; sha256 = "1hsrx2wh627rnakgprzznwq8wfzykm1vjg6mmclj56yz182cxcni"; })
(fetchurl { url = "http://people.freedesktop.org/~agd5f/radeon_ucode/ARUBA_pfp.bin"; sha256 = "0hxlqqqbga9jl71pmyqm0ladvrm350pqp1kxbmwib4pkd6zs7ybh"; })
(fetchurl { url = "http://people.freedesktop.org/~agd5f/radeon_ucode/ARUBA_rlc.bin"; sha256 = "1vvnqflc871c1wigzvhrqdmcqzrsxy2g3wc9cbzd810cx1bghnd7"; })
];
@matejc
matejc / autolock (run on startup)
Last active August 20, 2016 17:17
my lock screen mechanism(change paths accordingly)
#!/usr/bin/env bash
/run/current-system/sw/bin/xautolock -time 30 -locker '/home/matej/sync/bin/lockscreen' &
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#{{{ Main
set $mod Mod4
# monitors
# LVDS1
set $mon_lap LVDS
set $mon_ext VGA-0
@matejc
matejc / Xvncmy.sh
Last active December 27, 2015 12:49
my hydra release files
#!/usr/bin/env bash
# requirements: pkgs.tightvnc, pkgs.xorg.fontmiscmisc, pkgs.xorg.fontcursormisc
function attr2path {
echo "let pkgs = import <nixpkgs> {}; in (toString $1)+\"$2\"" | nix-instantiate --eval-only --strict - | cut -d "\"" -f 2
}
VNCFONTS=`attr2path pkgs.xorg.fontmiscmisc /lib/X11/fonts/misc`,`attr2path pkgs.xorg.fontcursormisc /lib/X11/fonts/misc`
@matejc
matejc / nixmy
Last active December 28, 2015 08:19
nixmy - my nixpkgs repo manage script inspired by nixdev but much much simpler
#!/bin/sh
# !!!MODIFY NEXT 3 LINES BEFORE RUNNING ANY COMMANDS!!!
export NIX_MY_PKGS='/home/matej/workarea/nixpkgs' # where the local repo is/will be after nixmy-init
export NIX_USER_PROFILE_DIR='/nix/var/nix/profiles/per-user/matej' # change your user name
export NIX_MY_GITHUB='git://github.com/matejc/nixpkgs.git' # your nixpkgs git repository
# after running nixmy-init you will have nixpkgs directory in current working directory
#
@matejc
matejc / configuration.nix
Created November 21, 2013 16:02
hydra server
{ config, pkgs, ... }:
let
hydra = pkgs.fetchgit { url = https://github.com/NixOS/hydra; rev = "refs/heads/master"; };
in {
...
require = [ "${hydra}/hydra-module.nix" ];
...
@matejc
matejc / 3_vm.nix
Last active January 3, 2016 15:29
my hydra build scripts part 2
{ nixpkgs
, nixes
, supportedSystems ? [ "x86_64-linux" ]
, system ? builtins.currentSystem
, attrs ? [ "pkgs.pythonPackages.virtualenv" "pkgs.bash" ]
, storeDir ? "/var/matej"
, minimal ? false
, vm_timeout ? "180"
}:
@matejc
matejc / dmesg
Last active January 4, 2016 12:29
[228393.067229] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x50000 action 0x0
[228393.067305] ata1.00: BMDMA stat 0x25
[228393.067344] ata1.00: SError: { PHYRdyChg CommWake }
[228393.067392] ata1.00: failed command: WRITE DMA
[228393.067443] ata1.00: cmd ca/00:10:10:70:64/00:00:00:00:00/e2 tag 0 dma 8192 out
res 51/04:10:10:70:64/04:02:08:00:00/e2 Emask 0x1 (device error)
[228393.067577] ata1.00: status: { DRDY ERR }
[228393.067616] ata1.00: error: { ABRT }
[228393.070063] ata1.00: both IDENTIFYs aborted, assuming NODEV
[228393.070067] ata1.00: revalidation failed (errno=-2)
general {
output_format = "i3bar"
colors = true
interval = 5
}
#order += "ipv6"
order += "disk /"
order += "disk /home"
order += "disk /tmp"