Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Created October 23, 2016 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/a6d7e4cec5c32a15b5f2e473c8f986e3 to your computer and use it in GitHub Desktop.
Save cleverca22/a6d7e4cec5c32a15b5f2e473c8f986e3 to your computer and use it in GitHub Desktop.
# this goes into ~/.nixpkgs/
{
allowUnfree = true;
allowBroken = false;
pulseaudio = true;
packageOverrides = pkgs: rec {
rPackages = pkgs.rPackages.override {
overrides = {
png = pkgs.rPackages.png.overrideDerivation (old: { nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.libpng.dev ]; });
};
};
mystuff = with pkgs; buildEnv {
name = "mystuff";
paths = [
(pkgs.makeDesktopItem { name = "jvisualvm"; exec = "${pkgs.oraclejdk}/bin/jvisualvm"; desktopName = "JVisualVM"; genericName = "jvisualvm"; categories = "Development;Debugger;"; })
asciinema audacity alsaTools
bind
dfeet
dos2unix
gnome3.gedit gimp gist gnupg
iperf
jq
keybase kde4.kdenlive
man-pages posix_man_pages stdmanpages glibcInfo
minitube
nix-prefetch-scripts
pinfo pv
sloccount
technic
utox
xbindkeys xclip
#xfce.xfce4_verve_plugin xfce.xfce4_clipman_plugin xfce.xfce4_pulseaudio_plugin
xfce.xfce4taskmanager
youtube-dl
zsnes
tigervnc
#(pkgs.callPackage ./multimc.nix {}) ffmpeg-full wireshark
];
};
stuff = pkgs.runCommand "stuff" { } ''
#!${pkgs.stdenv.shell}
mkdir -p $out/bin
mkdir -p $out/share/man/man1
ln -s ${pkgs.binutils.out}/bin/readelf $out/bin
ln -s ${pkgs.binutils.out}/bin/strings $out/bin
ln -s ${pkgs.binutils.out}/share/man/man1/readelf.1.gz $out/share/man/man1/
ln -s ${pkgs.binutils.out}/share/man/man1/strings.1.gz $out/share/man/man1/
'';
technic = pkgs.callPackage ./technic.nix {};
FTB = pkgs.callPackage ./FTB.nix { openjdk8 = pkgs.oraclejdk8; };
};
}
{ lib, config, pkgs, pkgs_i686, ... }:
let
builders = import ./builders.nix;
foo = pkgs_i686.mesa_noglu.overrideDerivation (oldAttrs: {
src = /home/clever/x/mesa-11.2.2;
dontStrip = true;
});
in
{
imports = [ ./snmpd.nix ./clevers_machines.nix ./pulse_config.nix ];
swapDevices = [
{ device = "/dev/disk/by-partlabel/swap1"; priority = 10; }
{ device = "/dev/disk/by-partlabel/swap2"; priority = 10; }
{ device = "/dev/disk/by-uuid/ea242aa4-59c5-4597-a5a5-e2874318aca2"; priority = 10; }
{ device = "/dev/disk/by-uuid/3fdb005c-97e7-4dfb-9a3f-71748d714ae4"; priority = 9; }
];
boot = {
loader.grub = {
memtest86.enable = true;
version = 2;
enable = true;
device = "/dev/sda";
extraEntries = ''
menuentry "Windows 7" {
insmod part_gpt
insmod chain
set root="hd1,msdos1"
chainloader +1
}
'';
};
initrd.availableKernelModules = [ ];
kernelParams = [
"audit=0"
#"console=hvc0"
"boot.shell_on_fail"
#"vm.min_free_kbytes=4194304"
"zfs.zio_taskq_batch_pct=50"
"spl.spl_taskq_thread_bind=1"
];
extraModprobeConfig = "options snd_hda_intel enable=1,0";
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
};
nix = {
useSandbox = false;
maxJobs = 1;
buildCores = 7;
#distributedBuilds = true;
#buildMachines = builders."32bit" ++ builders."64bit";
buildMachines = [ builders.darwin ];
};
nixpkgs.config = {
allowUnfree = true;
# pulseaudio = false;
firefox = {
#enableGoogleTalkPlugin = true;
enableAdobeFlash = true;
icedtea = true;
};
git.svnSupport = false;
mplayer = {
pulseSupport = true;
fontconfigSupport = true;
lameSupport = true;
x264Support = false;
};
packageOverrides = pkgs: rec {
nix = pkgs.stdenv.lib.overrideDerivation pkgs.nix (oldAttrs: {
#patches = /home/clever/x/nix-1.11.2/upgrade.patch;
patches = ./hax.patch;
});
toxvpn = pkgs.callPackage /home/clever/apps/nix-misc/toxvpn.nix {};
bluez = pkgs.bluez5;
#teamviewer = pkgs.callPackage_i686 ./10.nix { acceptLicense = true; };
pulseCustom = pkgs.callPackage ./pulse.nix { };
#xfce = pkgs.xfce // rec {
# xfce4mixer = pkgs.xfce.xfce4mixer.override { pulseaudioSupport = false; };
# xfce4panel = pkgs.xfce.xfce4panel.override { inherit xfce4mixer; };
# thunar-build = pkgs.xfce.thunar-build.override { inherit xfce4panel; };
#};
linux_4_4 = pkgs.linux_4_4.override {
extraConfig = ''
SCHEDSTATS y
LATENCYTOP y
'';
};
};
chromium = {
enableSELinux = true;
enableNaCl = true;
enablePepperFlash = true;
gnomeSupport = false;
gnomeKeyringSupport = false;
pulseSupport = true;
enableWideVine = true;
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment