Merge branch 'master' of github.com:IvanMalison/dotfiles

This commit is contained in:
2018-07-14 19:26:29 -07:00
4 changed files with 117 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
{ config, pkgs, ... }:
let
gitter = with pkgs; callPackage ./gitter.nix { };
my-python-packages = python-packages: with python-packages; [
appdirs
requests
@@ -134,8 +135,11 @@ in
emacs
firefox
kleopatra
gitter
google-chrome
hexchat
quassel
keybase-gui-fixed
kodi
lxappearance
@@ -195,10 +199,18 @@ in
sbt
scala
# Node
nodePackages.npm
nodejs
# Rust
cargo
# Tools
bazaar
binutils
dfeet
dpkg
gcc
gdb
gitAndTools.git-sync
@@ -214,6 +226,7 @@ in
ncdu
neofetch
pass
patchelf
plasma-workspace
powertop
python-with-my-packages
@@ -238,9 +251,10 @@ in
transmission-gtk
];
environment.variables = {
GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache";
};
# XXX: Plasma seems to set this
# environment.variables = {
# GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache";
# };
programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
# Enabling zsh will clobber path because of the way it sets up /etc/zshenv
@@ -270,7 +284,7 @@ in
enable = true;
layout = "us";
desktopManager = {
gnome3.enable = true;
plasma5.enable = true;
default = "none";
};
windowManager = {
@@ -305,8 +319,7 @@ in
# Define a user account. Don't forget to set a password with passwd.
users.extraUsers = let
extraGroups = [
"wheel" "disk" "audio" "video"
"networkmanager" "systemd-journal"
"wheel" "disk" "audio" "video" "networkmanager" "systemd-journal"
];
userDefaults = {
inherit extraGroups;

71
nixos/gitter.nix Normal file
View File

@@ -0,0 +1,71 @@
{ stdenv, alsaLib, atk, cairo, cups, dbus, dpkg, expat, fetchurl
, fontconfig, freetype, gdk_pixbuf, glib, gnome3, gtk3, libX11
, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext, libXfixes
, libXi, libXrandr, libXrender, libXtst, libappindicator-gtk3, libcxx
, libnotify, libpulseaudio, libxcb, makeDesktopItem, makeWrapper, nspr, nss
, nwjs, pango, systemd }:
let gitterDirectorySuffix = "opt/gitter";
doELFPatch = target: ''
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
--set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \
$out/${gitterDirectorySuffix}/${target}
'';
libPath = stdenv.lib.makeLibraryPath [
alsaLib atk cairo cups dbus expat fontconfig freetype gdk_pixbuf glib
gnome3.gconf gtk3 libX11 libXScrnSaver libXcomposite libXcursor libXdamage
libXext libXfixes libXi libXrandr libXrender libXtst libappindicator-gtk3
libcxx libnotify libpulseaudio libxcb nspr nss pango stdenv.cc.cc systemd
];
in stdenv.mkDerivation rec {
pname = "gitter";
version = "4.1.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://update.gitter.im/linux64/${pname}_${version}_amd64.deb";
sha256 = "1gny9i2pywvczzrs93k8krqn6hwm6c2zg8yr3xmjqs3p88817wbi";
};
nativeBuildInputs = [ makeWrapper dpkg ];
unpackPhase = "dpkg -x $src .";
installPhase = ''
mkdir -p $out/{bin,opt/gitter,share/pixmaps}
mv ./opt/Gitter/linux64/* $out/opt/gitter
${doELFPatch "Gitter"}
${doELFPatch "nacl_helper"}
${doELFPatch "minidump_stackwalk"}
${doELFPatch "nwjc"}
${doELFPatch "chromedriver"}
${doELFPatch "payload"}
patchelf --set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \
$out/${gitterDirectorySuffix}/lib/libnw.so
wrapProgram $out/${gitterDirectorySuffix}/Gitter --prefix LD_LIBRARY_PATH : ${libPath}
ln -s $out/${gitterDirectorySuffix}/Gitter $out/bin/
ln -s $out/${gitterDirectorySuffix}/logo.png $out/share/pixmaps/gitter.png
ln -s "${desktopItem}/share/applications" $out/share/
'';
desktopItem = makeDesktopItem {
name = pname;
exec = "Gitter";
icon = pname;
desktopName = "Gitter";
genericName = meta.description;
categories = "Network;InstantMessaging;";
};
meta = with stdenv.lib; {
description = "Where developers come to talk";
downloadPage = "https://gitter.im/apps";
license = licenses.mit;
maintainers = [ maintainers.imalison ];
platforms = [ "x86_64-linux" ];
};
}